mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-09-08 21:48:18 +00:00
Merge pull request #1437 from Tria-plc/freight_feature/usermanagement
fix issues
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
import { MigrationInterface, QueryRunner } from 'typeorm';
|
||||
|
||||
/**
|
||||
* Why a train schedule was cancelled, captured at cancel time. Staff pick a
|
||||
* reason in the cancel dialog and every view of the cancelled schedule reads it
|
||||
* back — a cancelled train on the board used to say nothing about why it died.
|
||||
*/
|
||||
export class ScheduleCancellationReason3780000000000 implements MigrationInterface {
|
||||
name = 'ScheduleCancellationReason3780000000000';
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`
|
||||
ALTER TABLE "freight"."train_schedules"
|
||||
ADD COLUMN IF NOT EXISTS "cancellation_reason" varchar(500),
|
||||
ADD COLUMN IF NOT EXISTS "cancelled_at" timestamptz,
|
||||
ADD COLUMN IF NOT EXISTS "cancelled_by_user_id" uuid
|
||||
`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`
|
||||
ALTER TABLE "freight"."train_schedules"
|
||||
DROP COLUMN IF EXISTS "cancellation_reason",
|
||||
DROP COLUMN IF EXISTS "cancelled_at",
|
||||
DROP COLUMN IF EXISTS "cancelled_by_user_id"
|
||||
`);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user