summary refs log tree commit diff
path: root/util/src/migrations/mariadb/1660131942703-apps_nullable_team.ts
blob: ac4457725f94fc87ccae1f0e48b9707addf339e6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import { MigrationInterface, QueryRunner } from "typeorm";

export class appsNullableTeam1660131942703 implements MigrationInterface {
    name = 'appsNullableTeam1660131942703'

    public async up(queryRunner: QueryRunner): Promise<void> {
        await queryRunner.query(`
            DROP INDEX \`IDX_2ce5a55796fe4c2f77ece57a64\` ON \`applications\`
        `);
    }

    public async down(queryRunner: QueryRunner): Promise<void> {
        await queryRunner.query(`
            CREATE UNIQUE INDEX \`IDX_2ce5a55796fe4c2f77ece57a64\` ON \`applications\` (\`bot_user_id\`)
        `);
    }

}