From f7cc67b455a12ccae9b0ea16876d166720364357 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 4 Jan 2019 08:56:20 +0100 Subject: Add new follow, mention and user registered notifs --- server/initializers/migrations/0315-user-notifications.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'server/initializers/migrations/0315-user-notifications.ts') 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, "blacklistOnMyVideo" INTEGER NOT NULL DEFAULT NULL, "myVideoPublished" INTEGER NOT NULL DEFAULT NULL, "myVideoImportFinished" INTEGER NOT NULL DEFAULT NULL, +"newUserRegistration" INTEGER NOT NULL DEFAULT NULL, +"newFollow" INTEGER NOT NULL DEFAULT NULL, +"commentMention" INTEGER NOT NULL DEFAULT NULL, "userId" INTEGER REFERENCES "user" ("id") ON DELETE CASCADE ON UPDATE CASCADE, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "updatedAt" TIMESTAMP WITH TIME ZONE NOT NULL, @@ -26,8 +29,9 @@ PRIMARY KEY ("id")) { const query = 'INSERT INTO "userNotificationSetting" ' + '("newVideoFromSubscription", "newCommentOnMyVideo", "videoAbuseAsModerator", "blacklistOnMyVideo", ' + - '"myVideoPublished", "myVideoImportFinished", "userId", "createdAt", "updatedAt") ' + - '(SELECT 2, 2, 4, 4, 2, 2, id, NOW(), NOW() FROM "user")' + '"myVideoPublished", "myVideoImportFinished", "newUserRegistration", "newFollow", "commentMention", ' + + '"userId", "createdAt", "updatedAt") ' + + '(SELECT 2, 2, 4, 4, 2, 2, 2, 2, 2, id, NOW(), NOW() FROM "user")' await utils.sequelize.query(query) } -- cgit v1.2.3