n8n/packages/cli/src/databases/migrations/mysqldb/1594902918301-CreateIndexStoppedAt.ts
कारतोफ्फेलस्क्रिप्ट™ 82fe6383ef
refactor(core): Delete boilerplate code across migrations (no-changelog) (#5254)
2023-05-05 11:28:59 +02:00

24 lines
616 B
TypeScript

import type { MigrationContext, ReversibleMigration } from '@db/types';
export class CreateIndexStoppedAt1594902918301 implements ReversibleMigration {
async up({ queryRunner, tablePrefix }: MigrationContext) {
await queryRunner.query(
'CREATE INDEX `IDX_' +
tablePrefix +
'cefb067df2402f6aed0638a6c1` ON `' +
tablePrefix +
'execution_entity` (`stoppedAt`)',
);
}
async down({ queryRunner, tablePrefix }: MigrationContext) {
await queryRunner.query(
'DROP INDEX `IDX_' +
tablePrefix +
'cefb067df2402f6aed0638a6c1` ON `' +
tablePrefix +
'execution_entity`',
);
}
}