mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-30 13:28:11 +00:00
enhance train scheduling and booking management
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
import { MigrationInterface, QueryRunner } from 'typeorm';
|
||||
|
||||
/**
|
||||
* Adds bookings.consolidation_resume_status: the status a booking parked in
|
||||
* PENDING_CONSOLIDATION returns to once it pairs with a wagon partner.
|
||||
*
|
||||
* Direct customer bookings leave it NULL (they resume to SUBMITTED, unchanged).
|
||||
* Contract-drawdown bookings (GL shipments) set it to the status
|
||||
* createUnderContract would otherwise have used (OPERATION_REQUEST_PENDING or
|
||||
* AWAITING_DOCUMENTS), so pairing resumes them into the contract-booking flow
|
||||
* instead of wrongly moving them to SUBMITTED.
|
||||
*/
|
||||
export class AddConsolidationResumeStatus2010000000000
|
||||
implements MigrationInterface
|
||||
{
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`
|
||||
ALTER TABLE freight.bookings
|
||||
ADD COLUMN IF NOT EXISTS consolidation_resume_status VARCHAR(40);
|
||||
`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`
|
||||
ALTER TABLE freight.bookings
|
||||
DROP COLUMN IF EXISTS consolidation_resume_status;
|
||||
`);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user