summary refs log tree commit diff
path: root/src/util/migrations/postgres/1660265907544-CodeCleanup5.ts
blob: 0f098e1f9feffd9407134254f514cbb19ef23336 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import { MigrationInterface, QueryRunner } from "typeorm";

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

	public async up(queryRunner: QueryRunner): Promise<void> {
		await queryRunner.query(`
            ALTER TABLE "channels"
            ADD "flags" integer
        `);
		await queryRunner.query(`
            ALTER TABLE "channels"
            ADD "default_thread_rate_limit_per_user" integer
        `);
	}

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