mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-20 00:05:04 +00:00
Add index to expires_at
This commit is contained in:
parent
3032c51aad
commit
37cdb2e66b
1 changed files with 8 additions and 2 deletions
|
@ -1,8 +1,8 @@
|
|||
import { MigrationInterface, QueryRunner, Table } from "typeorm";
|
||||
import { MigrationInterface, QueryRunner, Table, TableIndex } from "typeorm";
|
||||
|
||||
export class CreateTempBansTable1608753440716 implements MigrationInterface {
|
||||
public async up(queryRunner: QueryRunner): Promise<any> {
|
||||
await queryRunner.createTable(
|
||||
const table = await queryRunner.createTable(
|
||||
new Table({
|
||||
name: "tempbans",
|
||||
columns: [
|
||||
|
@ -31,6 +31,12 @@ export class CreateTempBansTable1608753440716 implements MigrationInterface {
|
|||
],
|
||||
}),
|
||||
);
|
||||
queryRunner.createIndex(
|
||||
"tempbans",
|
||||
new TableIndex({
|
||||
columnNames: ["expires_at"],
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<any> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue