[backend] Enable authorized fetch by default for new instances

This does not affect existing instances.
This commit is contained in:
Laura Hausmann 2023-10-18 19:19:01 +02:00
parent 5d496a1636
commit 6b45b7019c
Signed by: zotan
GPG key ID: D044E84C5BE01605
2 changed files with 14 additions and 1 deletions

View file

@ -0,0 +1,13 @@
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`);
}
}

View file

@ -124,7 +124,7 @@ export class Meta {
public silencedHosts: string[];
@Column("boolean", {
default: false,
default: true,
})
public secureMode: boolean;