diff options
Diffstat (limited to 'server/initializers')
-rw-r--r-- | server/initializers/migrations/0315-user-notifications.ts | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/server/initializers/migrations/0315-user-notifications.ts b/server/initializers/migrations/0315-user-notifications.ts index 8c54c5d6c..34f9fd193 100644 --- a/server/initializers/migrations/0315-user-notifications.ts +++ b/server/initializers/migrations/0315-user-notifications.ts | |||
@@ -15,6 +15,9 @@ CREATE TABLE IF NOT EXISTS "userNotificationSetting" ("id" SERIAL, | |||
15 | "blacklistOnMyVideo" INTEGER NOT NULL DEFAULT NULL, | 15 | "blacklistOnMyVideo" INTEGER NOT NULL DEFAULT NULL, |
16 | "myVideoPublished" INTEGER NOT NULL DEFAULT NULL, | 16 | "myVideoPublished" INTEGER NOT NULL DEFAULT NULL, |
17 | "myVideoImportFinished" INTEGER NOT NULL DEFAULT NULL, | 17 | "myVideoImportFinished" INTEGER NOT NULL DEFAULT NULL, |
18 | "newUserRegistration" INTEGER NOT NULL DEFAULT NULL, | ||
19 | "newFollow" INTEGER NOT NULL DEFAULT NULL, | ||
20 | "commentMention" INTEGER NOT NULL DEFAULT NULL, | ||
18 | "userId" INTEGER REFERENCES "user" ("id") ON DELETE CASCADE ON UPDATE CASCADE, | 21 | "userId" INTEGER REFERENCES "user" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
19 | "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, | 22 | "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, |
20 | "updatedAt" TIMESTAMP WITH TIME ZONE NOT NULL, | 23 | "updatedAt" TIMESTAMP WITH TIME ZONE NOT NULL, |
@@ -26,8 +29,9 @@ PRIMARY KEY ("id")) | |||
26 | { | 29 | { |
27 | const query = 'INSERT INTO "userNotificationSetting" ' + | 30 | const query = 'INSERT INTO "userNotificationSetting" ' + |
28 | '("newVideoFromSubscription", "newCommentOnMyVideo", "videoAbuseAsModerator", "blacklistOnMyVideo", ' + | 31 | '("newVideoFromSubscription", "newCommentOnMyVideo", "videoAbuseAsModerator", "blacklistOnMyVideo", ' + |
29 | '"myVideoPublished", "myVideoImportFinished", "userId", "createdAt", "updatedAt") ' + | 32 | '"myVideoPublished", "myVideoImportFinished", "newUserRegistration", "newFollow", "commentMention", ' + |
30 | '(SELECT 2, 2, 4, 4, 2, 2, id, NOW(), NOW() FROM "user")' | 33 | '"userId", "createdAt", "updatedAt") ' + |
34 | '(SELECT 2, 2, 4, 4, 2, 2, 2, 2, 2, id, NOW(), NOW() FROM "user")' | ||
31 | 35 | ||
32 | await utils.sequelize.query(query) | 36 | await utils.sequelize.query(query) |
33 | } | 37 | } |