iceshrimp-161sh/packages/backend/src/migration/1697649475796-secure-mode-defaults.ts
Laura Hausmann 6b45b7019c
[backend] Enable authorized fetch by default for new instances
This does not affect existing instances.
2023-10-18 19:19:05 +02:00

14 lines
523 B
TypeScript

import { MigrationInterface, QueryRunner } from "typeorm";
export class SecureModeDefaults1697649475796 implements MigrationInterface {
name = 'SecureModeDefaults1697649475796'
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE "meta" ALTER COLUMN "secureMode" SET DEFAULT true`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE "meta" ALTER COLUMN "secureMode" SET DEFAULT false`);
}
}