diff options
Diffstat (limited to 'migration')
| -rw-r--r-- | migration/1629288472000-fix-channel-userId.ts | 14 |
1 files changed, 14 insertions, 0 deletions
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<void> { + await queryRunner.query(`ALTER TABLE "channel" ALTER COLUMN "userId" DROP NOT NULL;`); + } + + public async down(queryRunner: QueryRunner): Promise<void> { + await queryRunner.query(`ALTER TABLE "channel" ALTER COLUMN "userId" SET NOT NULL;`); + } + +} |