intercity fix

This commit is contained in:
Marshal
2026-07-31 10:50:16 +00:00
parent 74b7ee81fc
commit a64af98205
17 changed files with 1174 additions and 182 deletions

View File

@@ -0,0 +1,24 @@
import { MigrationInterface, QueryRunner } from "typeorm";
/**
* Consist adjustments can now happen mid-route (train standing at a stop), so
* each history row records WHERE it happened. Nullable — rows written before
* this column simply have no yard.
*/
export class AddYardToScheduleWagonAdjustmentLogs3110000000000 implements MigrationInterface {
name = "AddYardToScheduleWagonAdjustmentLogs3110000000000";
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(
`ALTER TABLE freight.schedule_wagon_adjustment_logs
ADD COLUMN IF NOT EXISTS yard_id uuid`,
);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(
`ALTER TABLE freight.schedule_wagon_adjustment_logs
DROP COLUMN IF EXISTS yard_id`,
);
}
}