3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-13 21:35:02 +00:00

Add support for hiding cases with !hidecase

This commit is contained in:
Dragory 2019-01-13 17:56:14 +02:00
parent ab71481b8f
commit 8de31844d5
6 changed files with 105 additions and 13 deletions

View file

@ -0,0 +1,25 @@
import { MigrationInterface, QueryRunner, TableColumn, TableIndex } from "typeorm";
export class AddIsHiddenToCases1547393619900 implements MigrationInterface {
public async up(queryRunner: QueryRunner): Promise<any> {
await queryRunner.addColumn(
"cases",
new TableColumn({
name: "is_hidden",
type: "tinyint",
unsigned: true,
default: 0
})
);
await queryRunner.createIndex(
"cases",
new TableIndex({
columnNames: ["is_hidden"]
})
);
}
public async down(queryRunner: QueryRunner): Promise<any> {
await queryRunner.dropColumn("cases", "is_hidden");
}
}