3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-18 23:09:59 +00:00
zeppelin/backend/src/migrations/1580038836906-CreateAntiraidLevelsTable.ts

29 lines
716 B
TypeScript
Raw Normal View History

import { MigrationInterface, QueryRunner, Table } from "typeorm";
export class CreateAntiraidLevelsTable1580038836906 implements MigrationInterface {
public async up(queryRunner: QueryRunner): Promise<any> {
await queryRunner.createTable(
new Table({
name: "antiraid_levels",
columns: [
{
name: "guild_id",
type: "bigint",
unsigned: true,
isPrimary: true,
},
{
name: "level",
type: "varchar",
length: "64",
},
],
}),
);
}
public async down(queryRunner: QueryRunner): Promise<any> {
await queryRunner.dropTable("antiraid_levels");
}
}