-- P5-6300: add name to market_locales


alter table market_locales
    add column name text;


update market_locales set name = 'Sweden' where market_id = (select id from markets where name = 'SE');
update market_locales set name = 'Norway' where market_id = (select id from markets where name = 'NO');
update market_locales set name = 'United Kingdom' where market_id = (select id from markets where name = 'GB');
update market_locales set name = 'Denmark' where market_id = (select id from markets where name = 'DK');
update market_locales set name = 'Finland' where market_id = (select id from markets where name = 'FI');
update market_locales set name = 'International' where market_id = (select id from markets where name = 'GLOBAL');
update market_locales set name = 'Germany' where market_id = (select id from markets where name = 'DE');
update market_locales set name = 'Netherlands' where market_id = (select id from markets where name = 'NL');
update market_locales set name = 'Austria' where market_id = (select id from markets where name = 'AT');
update market_locales set name = 'USA' where market_id = (select id from markets where name = 'US');
update market_locales set name = 'Spain' where market_id = (select id from markets where name = 'ES');
update market_locales set name = 'France' where market_id = (select id from markets where name = 'FR');
update market_locales set name = 'Poland' where market_id = (select id from markets where name = 'PL');
update market_locales set name = 'Italy' where market_id = (select id from markets where name = 'IT');


alter table market_locales
    alter column name set not null;
