mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-28 19:30:57 +00:00
20 lines
602 B
TypeScript
20 lines
602 B
TypeScript
import { MigrationInterface, QueryRunner } from 'typeorm';
|
|
|
|
export class AddWarehouseFeeRuleTiers1831000000000 implements MigrationInterface {
|
|
name = 'AddWarehouseFeeRuleTiers1831000000000';
|
|
|
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.query(`
|
|
ALTER TABLE freight.warehouse_fee_rules
|
|
ADD COLUMN IF NOT EXISTS tiers jsonb NOT NULL DEFAULT '[]';
|
|
`);
|
|
}
|
|
|
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.query(`
|
|
ALTER TABLE freight.warehouse_fee_rules
|
|
DROP COLUMN IF EXISTS tiers;
|
|
`);
|
|
}
|
|
}
|