1
0
Fork 1
mirror of https://example.com synced 2024-11-26 22:46:38 +09:00
firefish/packages/backend/migration/1626733991004-allowlist-secure-mode.js

21 lines
679 B
JavaScript
Raw Normal View History

2023-07-20 04:17:05 +09:00
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(
2023-09-30 22:06:34 +09:00
`ALTER TABLE "meta" ADD "privateMode" bool default true`,
2023-07-20 04:17:05 +09:00
);
}
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"`);
}
}