-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
14 additions
and
0 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
...resources/src/main/resources/flyway/ptistats/V1_60__link_hyvinvointialue_for_sotkanet.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
|
||
-- remove if it's already linked (in dev envs etc) | ||
DELETE FROM oskari_statistical_datasource_regionsets | ||
where datasource_id = (SELECT id FROM oskari_statistical_datasource WHERE locale like '%Sotkanet%') | ||
AND layer_id = (SELECT id FROM oskari_maplayer WHERE type='statslayer' AND name = 'tilastointialueet:hyvinvointialue4500k'); | ||
|
||
-- add the link | ||
INSERT INTO | ||
oskari_statistical_datasource_regionsets(datasource_id, layer_id, config) | ||
VALUES( | ||
(SELECT id FROM oskari_statistical_datasource | ||
WHERE locale like '%Sotkanet%'), | ||
(SELECT id FROM oskari_maplayer WHERE type='statslayer' AND name = 'tilastointialueet:hyvinvointialue4500k'), | ||
'{"regionType":"HYVINVOINTIALUE"}'); |