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

Update server owner dashboard permissions automatically

This commit is contained in:
Dragory 2021-09-05 14:34:06 +03:00
parent 971ec0de6c
commit 48c4b3578d
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1
9 changed files with 144 additions and 21 deletions

View file

@ -0,0 +1,24 @@
import { MigrationInterface, QueryRunner, TableColumn } from "typeorm";
export class AddTimestampsToAllowedGuilds1630840428694 implements MigrationInterface {
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.addColumns("allowed_guilds", [
new TableColumn({
name: "created_at",
type: "datetime",
default: "(NOW())",
}),
new TableColumn({
name: "updated_at",
type: "datetime",
default: "(NOW())",
onUpdate: "CURRENT_TIMESTAMP",
}),
]);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.dropColumn("allowed_guilds", "updated_at");
await queryRunner.dropColumn("allowed_guilds", "created_at");
}
}