aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2024-06-12 02:01:47 +0200
committerGuilhem Moulin <guilhem@fripost.org>2024-06-12 02:01:47 +0200
commit3bd492be08a97c16c813bc57773028def5c69e23 (patch)
treea0a1d10f7da26a08baa1323cb1d0f6777b061871
parent42cfe748e23bad6fc51b14a3e5896a77fdb5c1d5 (diff)
sks:UtfordAvverk: Add UNIQUE constraint on OBJECTID.
Not sure why I thought there was duplicates but I must have done something wrong as there are none in the 667034+223463+214082+ 72656 = 1177234 features found after removing the spatial filter.
-rw-r--r--config.yml3
-rw-r--r--schema.sql8
2 files changed, 9 insertions, 2 deletions
diff --git a/config.yml b/config.yml
index e82dce5..efa1841 100644
--- a/config.yml
+++ b/config.yml
@@ -515,8 +515,7 @@ layers:
# https://www.skogsstyrelsen.se/globalassets/sjalvservice/karttjanster/geodatatjanster/produktbeskrivningar/utforda-avverkningar---produktbeskrivning.pdf
- name: OBJECTID
type: Integer
- # XXX there are duplicates(!?)
- #unique: true
+ unique: true
nullable: false
#comment: unik identitet
- name: Beteckn
diff --git a/schema.sql b/schema.sql
index 3cb7d18..25cf25b 100644
--- a/schema.sql
+++ b/schema.sql
@@ -367,6 +367,14 @@ ALTER TABLE ONLY postgis."sks:AvverkAnm"
--
+-- Name: sks:UtfordAvverk sks:UtfordAvverk_OBJECTID_key; Type: CONSTRAINT; Schema: postgis; Owner: webmap_import
+--
+
+ALTER TABLE ONLY postgis."sks:UtfordAvverk"
+ ADD CONSTRAINT "sks:UtfordAvverk_OBJECTID_key" UNIQUE ("OBJECTID");
+
+
+--
-- Name: sks:UtfordAvverk sks:UtfordAvverk_pkey; Type: CONSTRAINT; Schema: postgis; Owner: webmap_import
--