mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-27 15:30:56 +00:00
26 lines
807 B
TypeScript
26 lines
807 B
TypeScript
import { MigrationInterface, QueryRunner } from "typeorm";
|
|
|
|
/**
|
|
* Track per-booking loading confirmation (LOADED/UNLOADED) on train_schedule_bookings.
|
|
* Tracking only — does not gate dispatch.
|
|
*/
|
|
export class AddLoadingStatusToTrainScheduleBookings1900000000000
|
|
implements MigrationInterface
|
|
{
|
|
name = "AddLoadingStatusToTrainScheduleBookings1900000000000";
|
|
|
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.query(`
|
|
ALTER TABLE freight.train_schedule_bookings
|
|
ADD COLUMN IF NOT EXISTS loading_status varchar(20) NOT NULL DEFAULT 'UNLOADED'
|
|
`);
|
|
}
|
|
|
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.query(`
|
|
ALTER TABLE freight.train_schedule_bookings
|
|
DROP COLUMN IF EXISTS loading_status
|
|
`);
|
|
}
|
|
}
|