Run database migrations automatically on startup

This commit removes the need for separate migrations with the sequelize-cli
by running them with umzug on application startup.

This is a port of #384

Co-authored-by: Sheogorath <sheogorath@shivering-isles.com>
Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
David Mehren
2021-02-27 21:33:05 +01:00
parent 6186e0f48f
commit 0db862f3c9
4 changed files with 54 additions and 315 deletions

View File

@@ -14,7 +14,7 @@
"dev": "webpack --config webpack.dev.js --progress --watch",
"heroku-prebuild": "bin/heroku",
"build": "webpack --config webpack.prod.js --progress",
"start": "sequelize db:migrate && node app.js"
"start": "node app.js"
},
"dependencies": {
"@passport-next/passport-openid": "^1.0.0",
@@ -117,7 +117,6 @@
"scrypt-kdf": "^2.0.1",
"select2": "^3.5.2-browserify",
"sequelize": "^5.21.1",
"sequelize-cli": "^6.0.0",
"shortid": "2.2.16",
"socket.io": "^2.1.1",
"socket.io-client": "^2.1.1",
@@ -128,6 +127,7 @@
"tedious": "^6.6.0",
"toobusy-js": "^0.5.1",
"turndown": "^7.0.0",
"umzug": "^2.3.0",
"uuid": "^8.0.0",
"validator": "^13.0.0",
"velocity-animate": "^1.4.0",