From 6a25015a78273f2958a7bde68a749ec4d46466cc Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 10 May 2023 10:53:01 +0900 Subject: [PATCH] =?UTF-8?q?enhance(backend):=20publicReactions=E3=82=92?= =?UTF-8?q?=E3=83=87=E3=83=95=E3=82=A9=E3=83=AB=E3=83=88true=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../1683683083083-public-reactions-default-true.js | 11 +++++++++++ packages/backend/src/models/entities/UserProfile.ts | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 packages/backend/migration/1683683083083-public-reactions-default-true.js diff --git a/packages/backend/migration/1683683083083-public-reactions-default-true.js b/packages/backend/migration/1683683083083-public-reactions-default-true.js new file mode 100644 index 000000000..195ea02a5 --- /dev/null +++ b/packages/backend/migration/1683683083083-public-reactions-default-true.js @@ -0,0 +1,11 @@ +export class PublicReactionsDefaultTrue1683683083083 { + name = 'PublicReactionsDefaultTrue1683683083083' + + async up(queryRunner) { + await queryRunner.query(`ALTER TABLE "user_profile" ALTER COLUMN "publicReactions" SET DEFAULT true`); + } + + async down(queryRunner) { + await queryRunner.query(`ALTER TABLE "user_profile" ALTER COLUMN "publicReactions" SET DEFAULT false`); + } +} diff --git a/packages/backend/src/models/entities/UserProfile.ts b/packages/backend/src/models/entities/UserProfile.ts index 6eab846c1..2cebc5609 100644 --- a/packages/backend/src/models/entities/UserProfile.ts +++ b/packages/backend/src/models/entities/UserProfile.ts @@ -76,7 +76,7 @@ export class UserProfile { public emailNotificationTypes: string[]; @Column('boolean', { - default: false, + default: true, }) public publicReactions: boolean;