diff --git a/apps/edr-freight-api/src/migrations/1749000000000-NormalizeWeightLimitTradeDirectionBoth.ts b/apps/edr-freight-api/src/migrations/1749000000000-NormalizeWeightLimitTradeDirectionBoth.ts index e2587c35c..5dc1d6315 100644 --- a/apps/edr-freight-api/src/migrations/1749000000000-NormalizeWeightLimitTradeDirectionBoth.ts +++ b/apps/edr-freight-api/src/migrations/1749000000000-NormalizeWeightLimitTradeDirectionBoth.ts @@ -14,8 +14,12 @@ export class NormalizeWeightLimitTradeDirectionBoth1749000000000 UPDATE freight.weight_limit_rules SET trade_direction = 'BOTH' WHERE trade_direction::text = 'ANY'; + + UPDATE freight.weight_limit_rules + SET trade_direction = 'IMPORT' + WHERE trade_direction IS NULL; EXCEPTION WHEN undefined_table OR undefined_column THEN NULL; - END $$; + END $$; `); }