3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-10 12:25:02 +00:00

Finished Starboard (Pre Override test)

This commit is contained in:
Nils Blömeke 2019-11-09 00:48:38 +01:00
parent 92402662e6
commit d82f5fbc46
9 changed files with 464 additions and 244 deletions

View file

@ -0,0 +1,44 @@
import { MigrationInterface, QueryRunner, Table } from "typeorm";
export class CreateStarboardReactionsTable1573248794313 implements MigrationInterface {
public async up(queryRunner: QueryRunner): Promise<any> {
await queryRunner.createTable(
new Table({
name: "starboard_reactions",
columns: [
{
name: "id",
type: "int",
isGenerated: true,
generationStrategy: "increment",
isPrimary: true,
},
{
name: "guild_id",
type: "bigint",
unsigned: true,
},
{
name: "message_id",
type: "bigint",
unsigned: true,
},
{
name: "reactor_id",
type: "bigint",
unsigned: true,
},
],
indices: [
{
columnNames: ["reactor_id", "message_id"],
},
],
}),
);
}
public async down(queryRunner: QueryRunner): Promise<any> {
await queryRunner.dropTable("starboard_reactions", true, false, true);
}
}