summary refs log tree commit diff
path: root/src/database/migration/postgres/1765587835846-InstanceBanAllowlist.ts
blob: 9eefea48dbb5ed9b9b5c9ed9a40cb39713c8924a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
import { MigrationInterface, QueryRunner } from "typeorm";

export class InstanceBanAllowlist1765587835846 implements MigrationInterface {
    name = "InstanceBanAllowlist1765587835846";

    public async up(queryRunner: QueryRunner): Promise<void> {
        await queryRunner.query(`ALTER TABLE "instance_bans" ADD "is_allowlisted" boolean NOT NULL DEFAULT false`);
    }

    public async down(queryRunner: QueryRunner): Promise<void> {
        await queryRunner.query(`ALTER TABLE "instance_bans" DROP COLUMN "is_allowlisted"`);
    }
}