summaryrefslogtreecommitdiff
path: root/migration/1613155914446-emailNotificationTypes.ts
diff options
context:
space:
mode:
Diffstat (limited to 'migration/1613155914446-emailNotificationTypes.ts')
-rw-r--r--migration/1613155914446-emailNotificationTypes.ts14
1 files changed, 14 insertions, 0 deletions
diff --git a/migration/1613155914446-emailNotificationTypes.ts b/migration/1613155914446-emailNotificationTypes.ts
new file mode 100644
index 0000000000..d6908aecfa
--- /dev/null
+++ b/migration/1613155914446-emailNotificationTypes.ts
@@ -0,0 +1,14 @@
+import {MigrationInterface, QueryRunner} from "typeorm";
+
+export class emailNotificationTypes1613155914446 implements MigrationInterface {
+ name = 'emailNotificationTypes1613155914446'
+
+ public async up(queryRunner: QueryRunner): Promise<void> {
+ await queryRunner.query(`ALTER TABLE "user_profile" ADD "emailNotificationTypes" jsonb NOT NULL DEFAULT '["follow","receiveFollowRequest","groupInvited"]'`);
+ }
+
+ public async down(queryRunner: QueryRunner): Promise<void> {
+ await queryRunner.query(`ALTER TABLE "user_profile" DROP COLUMN "emailNotificationTypes"`);
+ }
+
+}