P5-6098 add markets_locales table

This commit is contained in:
Martin Carlsson
2020-10-28 14:01:11 +01:00
committed by GitHub
parent f67a78d2b3
commit 3843e91f8a
+26
View File
@@ -0,0 +1,26 @@
-- P5-6098: add market_locales table
drop table if exists market_locales;
create table market_locales (
id serial,
market_id integer not null,
locale_id integer not null
);
alter table market_locales
add constraint market_fkey
foreign key (market_id)
references markets(id) match simple;
alter table market_locales
add constraint locale_fkey
foreign key (locale_id)
references locales(id) match simple;
insert into market_locales (market_id, locale_id)
select id, locale_id from markets;