2022-11-22 05:11:29 -08:00
|
|
|
import { MigrationInterface, QueryRunner } from 'typeorm';
|
2023-01-24 01:55:20 -08:00
|
|
|
import { getTablePrefix } from '@db/utils/migrationHelpers';
|
2021-02-08 23:59:32 -08:00
|
|
|
|
|
|
|
export class MakeStoppedAtNullable1607431743768 implements MigrationInterface {
|
|
|
|
name = 'MakeStoppedAtNullable1607431743768';
|
|
|
|
|
|
|
|
async up(queryRunner: QueryRunner): Promise<void> {
|
2023-01-24 01:55:20 -08:00
|
|
|
const tablePrefix = getTablePrefix();
|
2022-11-22 05:11:29 -08:00
|
|
|
await queryRunner.query(
|
|
|
|
'ALTER TABLE ' + tablePrefix + 'execution_entity ALTER COLUMN "stoppedAt" DROP NOT NULL',
|
|
|
|
undefined,
|
|
|
|
);
|
2021-02-08 23:59:32 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
async down(queryRunner: QueryRunner): Promise<void> {
|
|
|
|
// Cannot be undone as column might already have null values
|
|
|
|
}
|
|
|
|
}
|