Add migration for allowedHosts, secureMode, privateMode

This commit is contained in:
nullobsi 2021-07-19 15:41:23 -07:00 committed by Kayden Tebau
parent 1b014bc3e5
commit 7887082622
No known key found for this signature in database
GPG key ID: 933A1F44222C2634

View file

@ -0,0 +1,17 @@
export class allowlistSecureMode1626733991004 {
name = 'allowlistSecureMode1626733991004';
async up(queryRunner) {
await queryRunner.query(`ALTER TABLE "meta" ADD "allowedHosts" character varying(256) [] default '{}'`);
await queryRunner.query(`ALTER TABLE "meta" ADD "secureMode" bool default false`);
await queryRunner.query(`ALTER TABLE "meta" ADD "privateMode" bool default false`);
}
async down(queryRunner) {
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "allowedHosts"`);
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "secureMode"`);
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "privateMode"`);
}
}