This commit is contained in:
parent
43bbaa0035
commit
b800fbe741
2 changed files with 28 additions and 16 deletions
|
@ -3,18 +3,24 @@ import { MigrationInterface, QueryRunner, Table, TableColumn } from "typeorm";
|
||||||
export class MoveStarboardsToConfig1573248462469 implements MigrationInterface {
|
export class MoveStarboardsToConfig1573248462469 implements MigrationInterface {
|
||||||
public async up(queryRunner: QueryRunner): Promise<any> {
|
public async up(queryRunner: QueryRunner): Promise<any> {
|
||||||
// Create a new column for the channel's id
|
// Create a new column for the channel's id
|
||||||
await queryRunner.addColumn("starboard_messages", new TableColumn({
|
await queryRunner.addColumn(
|
||||||
name: "starboard_channel_id",
|
"starboard_messages",
|
||||||
type: "bigint",
|
new TableColumn({
|
||||||
unsigned: true,
|
name: "starboard_channel_id",
|
||||||
}));
|
type: "bigint",
|
||||||
|
unsigned: true,
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
|
||||||
// Since we are removing the guild_id with the starboards table, we might want it here
|
// Since we are removing the guild_id with the starboards table, we might want it here
|
||||||
await queryRunner.addColumn("starboard_messages", new TableColumn({
|
await queryRunner.addColumn(
|
||||||
name: "guild_id",
|
"starboard_messages",
|
||||||
type: "bigint",
|
new TableColumn({
|
||||||
unsigned: true,
|
name: "guild_id",
|
||||||
}));
|
type: "bigint",
|
||||||
|
unsigned: true,
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
|
||||||
// Migrate the old starboard_id to the new starboard_channel_id
|
// Migrate the old starboard_id to the new starboard_channel_id
|
||||||
await queryRunner.query(`
|
await queryRunner.query(`
|
||||||
|
@ -43,11 +49,14 @@ export class MoveStarboardsToConfig1573248462469 implements MigrationInterface {
|
||||||
await queryRunner.dropColumn("starboard_messages", "starboard_channel_id");
|
await queryRunner.dropColumn("starboard_messages", "starboard_channel_id");
|
||||||
await queryRunner.dropColumn("starboard_messages", "guild_id");
|
await queryRunner.dropColumn("starboard_messages", "guild_id");
|
||||||
|
|
||||||
await queryRunner.addColumn("starboard_messages", new TableColumn({
|
await queryRunner.addColumn(
|
||||||
name: "starboard_id",
|
"starboard_messages",
|
||||||
type: "int",
|
new TableColumn({
|
||||||
unsigned: true,
|
name: "starboard_id",
|
||||||
}));
|
type: "int",
|
||||||
|
unsigned: true,
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
|
||||||
await queryRunner.query(`
|
await queryRunner.query(`
|
||||||
ALTER TABLE starboard_messages
|
ALTER TABLE starboard_messages
|
||||||
|
|
|
@ -8,7 +8,10 @@
|
||||||
/>
|
/>
|
||||||
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
|
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
|
||||||
<meta property="og:title" content="ZappyZep" />
|
<meta property="og:title" content="ZappyZep" />
|
||||||
<meta property="og:description" content="ZappyZep is a private moderation bot for Discord, designed with large servers and reliability in mind." />
|
<meta
|
||||||
|
property="og:description"
|
||||||
|
content="ZappyZep is a private moderation bot for Discord, designed with large servers and reliability in mind."
|
||||||
|
/>
|
||||||
<title>ZappyZep - Moderation bot for Discord</title>
|
<title>ZappyZep - Moderation bot for Discord</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
Loading…
Add table
Reference in a new issue