mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2026-09-26 19:51:42 +02:00
* ⚡ Set path alias for config * ⚡ Update config export * ⚡ Simplify config imports * ⚡ Update also additional imports * ⚡ Update path in collation migration * ⚡ Resolve aliased paths * 👕 Fix Codacy issue * 👕 Retry to fix Codacy issue Co-authored-by: Jan <janober@users.noreply.github.com> Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
21 lines
685 B
TypeScript
21 lines
685 B
TypeScript
import { MigrationInterface, QueryRunner } from "typeorm";
|
|
|
|
import { config } from '@config';
|
|
|
|
export class CreateIndexStoppedAt1594825041918 implements MigrationInterface {
|
|
name = 'CreateIndexStoppedAt1594825041918';
|
|
|
|
async up(queryRunner: QueryRunner): Promise<void> {
|
|
const tablePrefix = config.get('database.tablePrefix');
|
|
|
|
await queryRunner.query(`CREATE INDEX "IDX_${tablePrefix}cefb067df2402f6aed0638a6c1" ON "${tablePrefix}execution_entity" ("stoppedAt") `);
|
|
}
|
|
|
|
async down(queryRunner: QueryRunner): Promise<void> {
|
|
const tablePrefix = config.get('database.tablePrefix');
|
|
|
|
await queryRunner.query(`DROP INDEX "IDX_${tablePrefix}cefb067df2402f6aed0638a6c1"`);
|
|
}
|
|
|
|
}
|