Archive old migrations (#426)
* Archive old migrations * Fix invalid placement of migrations
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
-- P5-6492: copy price adjustments to market table
|
||||
|
||||
alter table markets
|
||||
add column price_adjustment numeric not null default 1;
|
||||
|
||||
|
||||
update markets
|
||||
set price_adjustment = x.adjustment
|
||||
from (
|
||||
select adjustment, locales.id as locale_id
|
||||
from price_adjustments
|
||||
join locales on price_adjustments.territory = substr(locales.value, 4)
|
||||
) x
|
||||
where x.locale_id = markets.locale_id;
|
||||
Reference in New Issue
Block a user