From ebadd7fd3f255af3dd5035afe1d0d75337fa39a4 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 13 Feb 2021 12:28:26 +0900 Subject: wip: email notification --- migration/1613155914446-emailNotificationTypes.ts | 14 ++++++++++++++ migration/1613181457597-user-lang.ts | 14 ++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 migration/1613155914446-emailNotificationTypes.ts create mode 100644 migration/1613181457597-user-lang.ts (limited to 'migration') 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 { + await queryRunner.query(`ALTER TABLE "user_profile" ADD "emailNotificationTypes" jsonb NOT NULL DEFAULT '["follow","receiveFollowRequest","groupInvited"]'`); + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE "user_profile" DROP COLUMN "emailNotificationTypes"`); + } + +} diff --git a/migration/1613181457597-user-lang.ts b/migration/1613181457597-user-lang.ts new file mode 100644 index 0000000000..ac1fc88c99 --- /dev/null +++ b/migration/1613181457597-user-lang.ts @@ -0,0 +1,14 @@ +import {MigrationInterface, QueryRunner} from "typeorm"; + +export class userLang1613181457597 implements MigrationInterface { + name = 'userLang1613181457597' + + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE "user_profile" ADD "lang" character varying(32)`); + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE "user_profile" DROP COLUMN "lang"`); + } + +} -- cgit v1.2.3-freya