mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-29 14:08:11 +00:00
feat: updateing the loading and unloading
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
/**
|
||||
* Standard loading-and-unloading time, so the handling figure can be reported
|
||||
* the way the OCC scorecard reports it — hours against a target, with a rate.
|
||||
*
|
||||
* Nullable with NO default, unlike every other column in this table. The
|
||||
* reporting spec publishes standards for a station stay (10h / 13h) and for a
|
||||
* turn-around cycle (65 / 88 / 96) but none for handling, so there is no
|
||||
* honest figure to seed. Until a planner enters one in Operating standards the
|
||||
* rate reads empty rather than judging trains against an invented number.
|
||||
*/
|
||||
export class HandlingStandards3700000000000 implements MigrationInterface {
|
||||
name = "HandlingStandards3700000000000";
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`
|
||||
ALTER TABLE freight.operations_standards
|
||||
ADD COLUMN IF NOT EXISTS handling_standard_hours_container numeric(6,2),
|
||||
ADD COLUMN IF NOT EXISTS handling_standard_hours_bulk numeric(6,2);
|
||||
`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`
|
||||
ALTER TABLE freight.operations_standards
|
||||
DROP COLUMN IF EXISTS handling_standard_hours_container,
|
||||
DROP COLUMN IF EXISTS handling_standard_hours_bulk;
|
||||
`);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user