mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-27 08:32:54 +00:00
27 lines
838 B
TypeScript
27 lines
838 B
TypeScript
import { MigrationInterface, QueryRunner } from "typeorm";
|
|
|
|
/**
|
|
* Container number carried by each vehicle on a last-mile delivery. Auto-filled
|
|
* from the booking's container number when present, else entered by the operator
|
|
* at assignment time.
|
|
*/
|
|
export class AddLastMileAssignmentContainerNumber1890000000009
|
|
implements MigrationInterface
|
|
{
|
|
name = "AddLastMileAssignmentContainerNumber1890000000009";
|
|
|
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.query(`
|
|
ALTER TABLE freight.last_mile_vehicle_assignments
|
|
ADD COLUMN IF NOT EXISTS container_number varchar
|
|
`);
|
|
}
|
|
|
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.query(`
|
|
ALTER TABLE freight.last_mile_vehicle_assignments
|
|
DROP COLUMN IF EXISTS container_number
|
|
`);
|
|
}
|
|
}
|