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:
parent
971ec0de6c
commit
48c4b3578d
9 changed files with 144 additions and 21 deletions
|
@ -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");
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue