From b3249d91759f5c002b85effc176a6da2776d8cf8 Mon Sep 17 00:00:00 2001 From: Sheogorath Date: Thu, 16 Apr 2020 16:15:31 +0200 Subject: [PATCH] Limit DB schema changes to migrations Database migrations should be in charge of changing and modifying the database schema. Therefore this breaking change removes the automatic model synchronisation from the application startup, that we have practised way too long and that always caused problems for us. References: https://sequelize.org/v5/manual/getting-started.html#note-for-production https://github.com/codimd/server/commit/81e3d7bd00686b5e4d1e0b53db3eca9901c183c1 https://github.com/codimd/server/commit/f85ba6df5357a068d0f8c68a8accfc0611a0c55c Signed-off-by: Sheogorath --- lib/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/app.js b/lib/app.js index 6b1db1aa9..26ddd4d93 100644 --- a/lib/app.js +++ b/lib/app.js @@ -254,7 +254,7 @@ function startListen () { } // sync db then start listen -models.sequelize.sync().then(function () { +models.sequelize.authenticate().then(function () { // check if realtime is ready if (realtime.isReady()) { models.Revision.checkAllNotesRevision(function (err, notes) {