From 7629fcba82469609963d9aff1e374235e23607bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20G=C3=B3is?= Date: Thu, 23 Feb 2023 11:39:39 +0000 Subject: [PATCH] fix: notifications tables drop order (#3186) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since `user_notifications` references `notifications`, it makes sense to drop `user_notifications` before dropping `notifications` and not the other way around. This should fix the failing tests on Enterprise with latest main. Thanks @gastonfournier for the help finding the bug 👍 --- src/migrations/20230222154915-create-notiications-table.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/migrations/20230222154915-create-notiications-table.js b/src/migrations/20230222154915-create-notiications-table.js index a9fa980c09..c7a7130b7b 100644 --- a/src/migrations/20230222154915-create-notiications-table.js +++ b/src/migrations/20230222154915-create-notiications-table.js @@ -25,8 +25,9 @@ exports.up = function (db, cb) { exports.down = function (db, cb) { db.runSql( ` + DROP TABLE IF EXISTS user_notifications; DROP TABLE IF EXISTS notifications; - DROP TABLE IF EXISTS user_notifications;`, + `, cb, ); };