mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-28 21:50:57 +00:00
27 lines
845 B
TypeScript
27 lines
845 B
TypeScript
import { MigrationInterface, QueryRunner } from 'typeorm';
|
|
|
|
/**
|
|
* The booking wizard now captures a NON-BINDING estimated shipment date instead
|
|
* of the binding scheduledDate. The binding scheduledDate (validated against
|
|
* open train departures) is set later, at the operation-request step.
|
|
*/
|
|
export class AddEstimatedShipmentDate1820000000012
|
|
implements MigrationInterface
|
|
{
|
|
name = 'AddEstimatedShipmentDate1820000000012';
|
|
|
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.query(`
|
|
ALTER TABLE freight.bookings
|
|
ADD COLUMN IF NOT EXISTS estimated_shipment_date timestamptz NULL;
|
|
`);
|
|
}
|
|
|
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.query(`
|
|
ALTER TABLE freight.bookings
|
|
DROP COLUMN IF EXISTS estimated_shipment_date;
|
|
`);
|
|
}
|
|
}
|