forked from Yiyang029/Hack-and-Roll-Bot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dbInit.js
35 lines (29 loc) · 904 Bytes
/
dbInit.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
const Sequelize = require('sequelize');
const sequelize = new Sequelize('database', 'username', 'password', {
host: 'localhost',
dialect: 'sqlite',
logging: false,
storage: 'database.sqlite',
});
//seq model
/*const Tags = sequelize.define('tags', {
name: {
type: Sequelize.STRING,
unique: true,
},
description: Sequelize.TEXT,
username: Sequelize.STRING,
usage_count: {
type: Sequelize.INTEGER,
defaultvalue: 0,
allowNull: false,
},
});*/
const Users = require('./Currency/Users.js') (sequelize, Sequelize.DataTypes);
/*const force = process.argv.includes('--force') || process.argv.includes('-f');
sequelize.sync({force}).then(async () => {
await Promise.all();
console.log('Database synced');
sequelize.close();
}).catch(console.error);*/
module.exports = { Users };