mirror of
https://github.com/Troplo/Colubrina.git
synced 2024-12-27 00:41:53 +11:00
Update index.js
This commit is contained in:
parent
344dd11bed
commit
678339c5c9
1 changed files with 2 additions and 14 deletions
16
cli/index.js
16
cli/index.js
|
@ -139,21 +139,9 @@ async function dbSetup() {
|
|||
}
|
||||
async function runMigrations() {
|
||||
console.log("Running migrations")
|
||||
const config = require("../backend/config/config.json").production
|
||||
const sequelize = new Sequelize(config)
|
||||
|
||||
const umzug = new Umzug({
|
||||
migrations: { glob: "../backend/migrations/*.js" },
|
||||
context: sequelize.getQueryInterface(),
|
||||
storage: new SequelizeStorage({ sequelize }),
|
||||
logger: console,
|
||||
logging: true
|
||||
execSync("cd ../backend && sequelize db:migrate", () => {
|
||||
console.log("Migrations applied")
|
||||
})
|
||||
|
||||
await (async () => {
|
||||
await umzug.up()
|
||||
})()
|
||||
console.log("Migrations applied")
|
||||
}
|
||||
async function createUser() {
|
||||
const user = {
|
||||
|
|
Loading…
Reference in a new issue