mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-18 23:09:59 +00:00
21 lines
549 B
TypeScript
21 lines
549 B
TypeScript
import { MigrationInterface, QueryRunner, TableIndex } from "typeorm";
|
|
|
|
export class AddIndexToArchivesExpiresAt1547392046629 implements MigrationInterface {
|
|
public async up(queryRunner: QueryRunner): Promise<any> {
|
|
await queryRunner.createIndex(
|
|
"archives",
|
|
new TableIndex({
|
|
columnNames: ["expires_at"],
|
|
}),
|
|
);
|
|
}
|
|
|
|
public async down(queryRunner: QueryRunner): Promise<any> {
|
|
await queryRunner.dropIndex(
|
|
"archives",
|
|
new TableIndex({
|
|
columnNames: ["expires_at"],
|
|
}),
|
|
);
|
|
}
|
|
}
|