3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-19 07:20:00 +00:00
zeppelin/backend/src/migrations/1547392046629-AddIndexToArchivesExpiresAt.ts

21 lines
562 B
TypeScript

import { MigrationInterface, QueryRunner, TableColumn, 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"],
}),
);
}
}