aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/initializers/migrations/0315-user-notifications.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-01-04 08:56:20 +0100
committerChocobozzz <chocobozzz@cpy.re>2019-01-09 11:15:15 +0100
commitf7cc67b455a12ccae9b0ea16876d166720364357 (patch)
treeeac2cdbf2e92a16b3eda5d74371c82bd79ae22cb /server/initializers/migrations/0315-user-notifications.ts
parentdc13348070d808d0ba3feb56a435b835c2e7e791 (diff)
downloadPeerTube-f7cc67b455a12ccae9b0ea16876d166720364357.tar.gz
PeerTube-f7cc67b455a12ccae9b0ea16876d166720364357.tar.zst
PeerTube-f7cc67b455a12ccae9b0ea16876d166720364357.zip
Add new follow, mention and user registered notifs
Diffstat (limited to 'server/initializers/migrations/0315-user-notifications.ts')
-rw-r--r--server/initializers/migrations/0315-user-notifications.ts8
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 }