From 881b914c6a7bdf73ed16194e71aa779b27de074e Mon Sep 17 00:00:00 2001 From: MeiMei <30769358+mei23@users.noreply.github.com> Date: Wed, 18 Aug 2021 22:04:04 +0900 Subject: チャンネルを作成しているとアカウントを削除できないのを修正 (#7653) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * チャンネルを作成しているとアカウントを削除できないのを修正 * CHANGELOG * nullable --- migration/1629288472000-fix-channel-userId.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 migration/1629288472000-fix-channel-userId.ts (limited to 'migration') diff --git a/migration/1629288472000-fix-channel-userId.ts b/migration/1629288472000-fix-channel-userId.ts new file mode 100644 index 0000000000..cd8f81bb01 --- /dev/null +++ b/migration/1629288472000-fix-channel-userId.ts @@ -0,0 +1,14 @@ +import {MigrationInterface, QueryRunner} from "typeorm"; + +export class fixChannelUserId1629288472000 implements MigrationInterface { + name = 'fixChannelUserId1629288472000' + + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE "channel" ALTER COLUMN "userId" DROP NOT NULL;`); + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE "channel" ALTER COLUMN "userId" SET NOT NULL;`); + } + +} -- cgit v1.2.3-freya