From 990978c7403ca58956c131dc7992ff113ea04ea6 Mon Sep 17 00:00:00 2001
From: Guilhem Moulin <guilhem@fripost.org>
Date: Tue, 22 Apr 2025 17:43:53 +0200
Subject: Skogsstyrelsen: Relax some constraints on the schema to reflect
 current GPKG files.

---
 schema.sql | 23 +++++------------------
 1 file changed, 5 insertions(+), 18 deletions(-)

(limited to 'schema.sql')

diff --git a/schema.sql b/schema.sql
index f56f711..b4d7608 100644
--- a/schema.sql
+++ b/schema.sql
@@ -2301,13 +2301,10 @@ CREATE TABLE postgis."sks:AvverkAnm" (
     "OBJECTID" integer NOT NULL,
     "Beteckn" character varying(12) NOT NULL,
     "ArendeAr" smallint NOT NULL,
-    "Avverktyp" character varying(254) NOT NULL,
-    "Andamal" character varying(62) NOT NULL,
-    "Skogstyp" character varying(254) NOT NULL,
     "Inkomdatum" date NOT NULL,
     "AnmaldHa" real NOT NULL,
-    "SkogsodlHa" real NOT NULL,
-    "NatforHa" real NOT NULL,
+    "SkogsodlHa" real,
+    "NatforHa" real,
     "ArendeStatus" character varying(254) NOT NULL,
     "AvvSasong" character varying(254) NOT NULL,
     "AvvHa" real,
@@ -2358,11 +2355,9 @@ CREATE TABLE postgis."sks:UtfordAvverk" (
     "Avverktyp" character varying(254) NOT NULL,
     "Skogstyp" character varying(254) NOT NULL,
     "AnmaldHa" real NOT NULL,
-    "SkogsodlHa" real NOT NULL,
-    "NatforHa" real NOT NULL,
-    "Avvdatum" date NOT NULL,
-    "KallaDatum" date,
-    "KallaAreal" character varying(62),
+    "NatforHa" real,
+    "Avvdatum" date,
+    "KallaDatum" character varying(62),
     "Forebild" character varying(62),
     "Efterbild" character varying(62),
     "ArealHa" real NOT NULL,
@@ -3936,14 +3931,6 @@ ALTER TABLE ONLY postgis."sametinget:flyttled"
     ADD CONSTRAINT "sametinget:flyttled_pkey" PRIMARY KEY (ogc_fid);
 
 
---
--- Name: sks:AvverkAnm sks:AvverkAnm_Beteckn_key; Type: CONSTRAINT; Schema: postgis; Owner: webmap_import
---
-
-ALTER TABLE ONLY postgis."sks:AvverkAnm"
-    ADD CONSTRAINT "sks:AvverkAnm_Beteckn_key" UNIQUE ("Beteckn");
-
-
 --
 -- Name: sks:AvverkAnm sks:AvverkAnm_OBJECTID_key; Type: CONSTRAINT; Schema: postgis; Owner: webmap_import
 --
-- 
cgit v1.2.3

