P5-6131 Slideshow slides belong to market_locales (#175)

This commit is contained in:
fredrikphotowall
2021-02-01 11:30:27 +01:00
committed by GitHub
parent e41dbb8c2b
commit ccc99542dc
+11
View File
@@ -0,0 +1,11 @@
-- P5-6131 Splashes belong to market_locale
ALTER TABLE slideshow_slides ADD COLUMN market_locale_id INTEGER REFERENCES market_locales (id);
UPDATE slideshow_slides SET market_locale_id = (
select id from market_locales
where slideshow_slides.market_id = market_locales.market_id
order by market_locales.id limit 1
);
ALTER TABLE slideshow_slides ALTER COLUMN market_locale_id SET NOT NULL;