mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-29 15:18:11 +00:00
fix issue
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
import { MigrationInterface, QueryRunner } from 'typeorm';
|
||||
|
||||
/**
|
||||
* Per-schedule wagon CUT plan — the mid-route stop where THIS departure
|
||||
* detaches each consist wagon and leaves it behind (10 wagons cut at Mojo,
|
||||
* the rest ride to Djibouti).
|
||||
*
|
||||
* Sparse jsonb map `{ wagonId: yardId }` on the schedule: a wagon missing
|
||||
* from the map rides to the schedule destination — exactly today's behavior,
|
||||
* so no backfill. The cut is a cap, not a promise: cargo may still alight
|
||||
* earlier, but never past the cut. Booking capacity debits every edge at or
|
||||
* after the cut; checkpoint logging settles the wagon there physically.
|
||||
*/
|
||||
export class SchedulePlannedWagonCutYards3650000000000 implements MigrationInterface {
|
||||
name = 'SchedulePlannedWagonCutYards3650000000000';
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`
|
||||
ALTER TABLE freight.train_schedules
|
||||
ADD COLUMN IF NOT EXISTS planned_wagon_cut_yards jsonb
|
||||
`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`
|
||||
ALTER TABLE freight.train_schedules DROP COLUMN IF EXISTS planned_wagon_cut_yards
|
||||
`);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user