mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-29 18:48:11 +00:00
truck type detantion
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import { MigrationInterface, QueryRunner } from 'typeorm';
|
||||
|
||||
/**
|
||||
* Truck-detention rules can be scoped by vehicle type (TRUCK / VAN / TRAILER /
|
||||
* TANKER / FLATBED / …), so different truck types carry different detention
|
||||
* rates. Null = applies to any truck type.
|
||||
*/
|
||||
export class AddFeeRuleVehicleType2010000000000 implements MigrationInterface {
|
||||
name = 'AddFeeRuleVehicleType2010000000000';
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE freight.warehouse_fee_rules ADD COLUMN IF NOT EXISTS vehicle_type varchar(20)`,
|
||||
);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE freight.warehouse_fee_rules DROP COLUMN IF EXISTS vehicle_type`);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user