From 4282556cf69e935cd567a6b56505a5c3f83a3b79 Mon Sep 17 00:00:00 2001
From: Guilhem Moulin <guilhem@fripost.org>
Date: Sat, 7 Jun 2025 16:49:51 +0200
Subject: =?UTF-8?q?Rename=20=E2=80=9Cnvr=E2=80=9D=20group=20to=20=E2=80=9C?=
 =?UTF-8?q?skydd=E2=80=9D=20and=20drop=20=E2=80=9Cnva:=E2=80=9D=20prefix.?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

It's clearer that way, after all Naturvårdsavtal and Återvätningsavtal
are not part of Naturvårdsverkets Naturvårdsregistret.
---
 schema.sql | 248 ++++++++++++++++++++++++++++++-------------------------------
 1 file changed, 124 insertions(+), 124 deletions(-)

(limited to 'schema.sql')

diff --git a/schema.sql b/schema.sql
index 53cf6dc..41226b2 100644
--- a/schema.sql
+++ b/schema.sql
@@ -1046,10 +1046,10 @@ ALTER SEQUENCE postgis."mrr:ut_olja_gas_diamant_forfallna_ogc_fid_seq" OWNED BY
 
 
 --
--- Name: nva:Naturvardsverket_Lansstyrelse; Type: TABLE; Schema: postgis; Owner: webmap_import
+-- Name: nvk:naturvardsavtal; Type: TABLE; Schema: postgis; Owner: webmap_import
 --
 
-CREATE TABLE postgis."nva:Naturvardsverket_Lansstyrelse" (
+CREATE TABLE postgis."nvk:naturvardsavtal" (
     ogc_fid bigint NOT NULL,
     "ID" integer NOT NULL,
     "DIARIENRNV" character varying(12) NOT NULL,
@@ -1062,20 +1062,20 @@ CREATE TABLE postgis."nva:Naturvardsverket_Lansstyrelse" (
 );
 
 
-ALTER TABLE postgis."nva:Naturvardsverket_Lansstyrelse" OWNER TO webmap_import;
+ALTER TABLE postgis."nvk:naturvardsavtal" OWNER TO webmap_import;
 
 --
--- Name: TABLE "nva:Naturvardsverket_Lansstyrelse"; Type: COMMENT; Schema: postgis; Owner: webmap_import
+-- Name: TABLE "nvk:naturvardsavtal"; Type: COMMENT; Schema: postgis; Owner: webmap_import
 --
 
-COMMENT ON TABLE postgis."nva:Naturvardsverket_Lansstyrelse" IS 'Naturvårdsavtal (Naturvårdsverket, Länsstyrelse)';
+COMMENT ON TABLE postgis."nvk:naturvardsavtal" IS 'Naturvårdsavtal (Naturvårdsverket, Länsstyrelse)';
 
 
 --
--- Name: nva:Naturvardsverket_Lansstyrelse_ogc_fid_seq; Type: SEQUENCE; Schema: postgis; Owner: webmap_import
+-- Name: nvk:naturvardsavtal_ogc_fid_seq; Type: SEQUENCE; Schema: postgis; Owner: webmap_import
 --
 
-CREATE SEQUENCE postgis."nva:Naturvardsverket_Lansstyrelse_ogc_fid_seq"
+CREATE SEQUENCE postgis."nvk:naturvardsavtal_ogc_fid_seq"
     START WITH 1
     INCREMENT BY 1
     NO MINVALUE
@@ -1083,64 +1083,13 @@ CREATE SEQUENCE postgis."nva:Naturvardsverket_Lansstyrelse_ogc_fid_seq"
     CACHE 1;
 
 
-ALTER TABLE postgis."nva:Naturvardsverket_Lansstyrelse_ogc_fid_seq" OWNER TO webmap_import;
+ALTER TABLE postgis."nvk:naturvardsavtal_ogc_fid_seq" OWNER TO webmap_import;
 
 --
--- Name: nva:Naturvardsverket_Lansstyrelse_ogc_fid_seq; Type: SEQUENCE OWNED BY; Schema: postgis; Owner: webmap_import
+-- Name: nvk:naturvardsavtal_ogc_fid_seq; Type: SEQUENCE OWNED BY; Schema: postgis; Owner: webmap_import
 --
 
-ALTER SEQUENCE postgis."nva:Naturvardsverket_Lansstyrelse_ogc_fid_seq" OWNED BY postgis."nva:Naturvardsverket_Lansstyrelse".ogc_fid;
-
-
---
--- Name: nva:Skogsstyrelsen; Type: TABLE; Schema: postgis; Owner: webmap_import
---
-
-CREATE TABLE postgis."nva:Skogsstyrelsen" (
-    ogc_fid bigint NOT NULL,
-    "Uuid" uuid NOT NULL,
-    "Beteckn" character varying(12) NOT NULL,
-    "ArendeAr" smallint NOT NULL,
-    "NvaTyp" character varying(254),
-    "Naturtyp" character varying(254),
-    "AreaTot" double precision NOT NULL,
-    "AreaProd" double precision NOT NULL,
-    "Standort" character varying(254),
-    "DatAvtal" date,
-    "Url" character varying(254) NOT NULL,
-    "Undertyp" character varying(64),
-    wkb_geometry postgis.geometry(MultiPolygon,3006) NOT NULL
-);
-
-
-ALTER TABLE postgis."nva:Skogsstyrelsen" OWNER TO webmap_import;
-
---
--- Name: TABLE "nva:Skogsstyrelsen"; Type: COMMENT; Schema: postgis; Owner: webmap_import
---
-
-COMMENT ON TABLE postgis."nva:Skogsstyrelsen" IS 'Naturvårdsavtal (Skogsstyrelsen)';
-
-
---
--- Name: nva:Skogsstyrelsen_ogc_fid_seq; Type: SEQUENCE; Schema: postgis; Owner: webmap_import
---
-
-CREATE SEQUENCE postgis."nva:Skogsstyrelsen_ogc_fid_seq"
-    START WITH 1
-    INCREMENT BY 1
-    NO MINVALUE
-    NO MAXVALUE
-    CACHE 1;
-
-
-ALTER TABLE postgis."nva:Skogsstyrelsen_ogc_fid_seq" OWNER TO webmap_import;
-
---
--- Name: nva:Skogsstyrelsen_ogc_fid_seq; Type: SEQUENCE OWNED BY; Schema: postgis; Owner: webmap_import
---
-
-ALTER SEQUENCE postgis."nva:Skogsstyrelsen_ogc_fid_seq" OWNED BY postgis."nva:Skogsstyrelsen".ogc_fid;
+ALTER SEQUENCE postgis."nvk:naturvardsavtal_ogc_fid_seq" OWNED BY postgis."nvk:naturvardsavtal".ogc_fid;
 
 
 --
@@ -2891,6 +2840,57 @@ ALTER TABLE postgis."sks:naturvarde_ogc_fid_seq" OWNER TO webmap_import;
 ALTER SEQUENCE postgis."sks:naturvarde_ogc_fid_seq" OWNED BY postgis."sks:naturvarde".ogc_fid;
 
 
+--
+-- Name: sks:naturvardsavtal; Type: TABLE; Schema: postgis; Owner: webmap_import
+--
+
+CREATE TABLE postgis."sks:naturvardsavtal" (
+    ogc_fid bigint NOT NULL,
+    "Uuid" uuid NOT NULL,
+    "Beteckn" character varying(12) NOT NULL,
+    "ArendeAr" smallint NOT NULL,
+    "NvaTyp" character varying(254),
+    "Naturtyp" character varying(254),
+    "AreaTot" double precision NOT NULL,
+    "AreaProd" double precision NOT NULL,
+    "Standort" character varying(254),
+    "DatAvtal" date,
+    "Url" character varying(254) NOT NULL,
+    "Undertyp" character varying(64),
+    wkb_geometry postgis.geometry(MultiPolygon,3006) NOT NULL
+);
+
+
+ALTER TABLE postgis."sks:naturvardsavtal" OWNER TO webmap_import;
+
+--
+-- Name: TABLE "sks:naturvardsavtal"; Type: COMMENT; Schema: postgis; Owner: webmap_import
+--
+
+COMMENT ON TABLE postgis."sks:naturvardsavtal" IS 'Naturvårdsavtal (Skogsstyrelsen)';
+
+
+--
+-- Name: sks:naturvardsavtal_ogc_fid_seq; Type: SEQUENCE; Schema: postgis; Owner: webmap_import
+--
+
+CREATE SEQUENCE postgis."sks:naturvardsavtal_ogc_fid_seq"
+    START WITH 1
+    INCREMENT BY 1
+    NO MINVALUE
+    NO MAXVALUE
+    CACHE 1;
+
+
+ALTER TABLE postgis."sks:naturvardsavtal_ogc_fid_seq" OWNER TO webmap_import;
+
+--
+-- Name: sks:naturvardsavtal_ogc_fid_seq; Type: SEQUENCE OWNED BY; Schema: postgis; Owner: webmap_import
+--
+
+ALTER SEQUENCE postgis."sks:naturvardsavtal_ogc_fid_seq" OWNED BY postgis."sks:naturvardsavtal".ogc_fid;
+
+
 --
 -- Name: sks:nyckelbiotop; Type: TABLE; Schema: postgis; Owner: webmap_import
 --
@@ -3581,17 +3581,10 @@ ALTER TABLE ONLY postgis."mrr:ut_olja_gas_diamant_forfallna" ALTER COLUMN ogc_fi
 
 
 --
--- Name: nva:Naturvardsverket_Lansstyrelse ogc_fid; Type: DEFAULT; Schema: postgis; Owner: webmap_import
+-- Name: nvk:naturvardsavtal ogc_fid; Type: DEFAULT; Schema: postgis; Owner: webmap_import
 --
 
-ALTER TABLE ONLY postgis."nva:Naturvardsverket_Lansstyrelse" ALTER COLUMN ogc_fid SET DEFAULT nextval('postgis."nva:Naturvardsverket_Lansstyrelse_ogc_fid_seq"'::regclass);
-
-
---
--- Name: nva:Skogsstyrelsen ogc_fid; Type: DEFAULT; Schema: postgis; Owner: webmap_import
---
-
-ALTER TABLE ONLY postgis."nva:Skogsstyrelsen" ALTER COLUMN ogc_fid SET DEFAULT nextval('postgis."nva:Skogsstyrelsen_ogc_fid_seq"'::regclass);
+ALTER TABLE ONLY postgis."nvk:naturvardsavtal" ALTER COLUMN ogc_fid SET DEFAULT nextval('postgis."nvk:naturvardsavtal_ogc_fid_seq"'::regclass);
 
 
 --
@@ -3832,6 +3825,13 @@ ALTER TABLE ONLY postgis."sks:atervatningsavtal" ALTER COLUMN ogc_fid SET DEFAUL
 ALTER TABLE ONLY postgis."sks:naturvarde" ALTER COLUMN ogc_fid SET DEFAULT nextval('postgis."sks:naturvarde_ogc_fid_seq"'::regclass);
 
 
+--
+-- Name: sks:naturvardsavtal ogc_fid; Type: DEFAULT; Schema: postgis; Owner: webmap_import
+--
+
+ALTER TABLE ONLY postgis."sks:naturvardsavtal" ALTER COLUMN ogc_fid SET DEFAULT nextval('postgis."sks:naturvardsavtal_ogc_fid_seq"'::regclass);
+
+
 --
 -- Name: sks:nyckelbiotop ogc_fid; Type: DEFAULT; Schema: postgis; Owner: webmap_import
 --
@@ -4278,35 +4278,11 @@ ALTER TABLE ONLY postgis."mrr:ut_olja_gas_diamant_forfallna"
 
 
 --
--- Name: nva:Naturvardsverket_Lansstyrelse nva:Naturvardsverket_Lansstyrelse_pkey; Type: CONSTRAINT; Schema: postgis; Owner: webmap_import
---
-
-ALTER TABLE ONLY postgis."nva:Naturvardsverket_Lansstyrelse"
-    ADD CONSTRAINT "nva:Naturvardsverket_Lansstyrelse_pkey" PRIMARY KEY (ogc_fid);
-
-
---
--- Name: nva:Skogsstyrelsen nva:Skogsstyrelsen_Beteckn_key; Type: CONSTRAINT; Schema: postgis; Owner: webmap_import
---
-
-ALTER TABLE ONLY postgis."nva:Skogsstyrelsen"
-    ADD CONSTRAINT "nva:Skogsstyrelsen_Beteckn_key" UNIQUE ("Beteckn");
-
-
---
--- Name: nva:Skogsstyrelsen nva:Skogsstyrelsen_Uuid_key; Type: CONSTRAINT; Schema: postgis; Owner: webmap_import
+-- Name: nvk:naturvardsavtal nvk:naturvardsavtal_pkey; Type: CONSTRAINT; Schema: postgis; Owner: webmap_import
 --
 
-ALTER TABLE ONLY postgis."nva:Skogsstyrelsen"
-    ADD CONSTRAINT "nva:Skogsstyrelsen_Uuid_key" UNIQUE ("Uuid");
-
-
---
--- Name: nva:Skogsstyrelsen nva:Skogsstyrelsen_pkey; Type: CONSTRAINT; Schema: postgis; Owner: webmap_import
---
-
-ALTER TABLE ONLY postgis."nva:Skogsstyrelsen"
-    ADD CONSTRAINT "nva:Skogsstyrelsen_pkey" PRIMARY KEY (ogc_fid);
+ALTER TABLE ONLY postgis."nvk:naturvardsavtal"
+    ADD CONSTRAINT "nvk:naturvardsavtal_pkey" PRIMARY KEY (ogc_fid);
 
 
 --
@@ -4861,6 +4837,30 @@ ALTER TABLE ONLY postgis."sks:naturvarde"
     ADD CONSTRAINT "sks:naturvarde_pkey" PRIMARY KEY (ogc_fid);
 
 
+--
+-- Name: sks:naturvardsavtal sks:naturvardsavtal_Beteckn_key; Type: CONSTRAINT; Schema: postgis; Owner: webmap_import
+--
+
+ALTER TABLE ONLY postgis."sks:naturvardsavtal"
+    ADD CONSTRAINT "sks:naturvardsavtal_Beteckn_key" UNIQUE ("Beteckn");
+
+
+--
+-- Name: sks:naturvardsavtal sks:naturvardsavtal_Uuid_key; Type: CONSTRAINT; Schema: postgis; Owner: webmap_import
+--
+
+ALTER TABLE ONLY postgis."sks:naturvardsavtal"
+    ADD CONSTRAINT "sks:naturvardsavtal_Uuid_key" UNIQUE ("Uuid");
+
+
+--
+-- Name: sks:naturvardsavtal sks:naturvardsavtal_pkey; Type: CONSTRAINT; Schema: postgis; Owner: webmap_import
+--
+
+ALTER TABLE ONLY postgis."sks:naturvardsavtal"
+    ADD CONSTRAINT "sks:naturvardsavtal_pkey" PRIMARY KEY (ogc_fid);
+
+
 --
 -- Name: sks:nyckelbiotop sks:nyckelbiotop_Beteckn_key; Type: CONSTRAINT; Schema: postgis; Owner: webmap_import
 --
@@ -5153,17 +5153,10 @@ CREATE INDEX "mrr:ut_olja_gas_diamant_forfallna_wkb_geometry_geom_idx" ON postgi
 
 
 --
--- Name: nva:Naturvardsverket_Lansstyrelse_wkb_geometry_geom_idx; Type: INDEX; Schema: postgis; Owner: webmap_import
+-- Name: nvk:naturvardsavtal_wkb_geometry_geom_idx; Type: INDEX; Schema: postgis; Owner: webmap_import
 --
 
-CREATE INDEX "nva:Naturvardsverket_Lansstyrelse_wkb_geometry_geom_idx" ON postgis."nva:Naturvardsverket_Lansstyrelse" USING gist (wkb_geometry);
-
-
---
--- Name: nva:Skogsstyrelsen_wkb_geometry_geom_idx; Type: INDEX; Schema: postgis; Owner: webmap_import
---
-
-CREATE INDEX "nva:Skogsstyrelsen_wkb_geometry_geom_idx" ON postgis."nva:Skogsstyrelsen" USING gist (wkb_geometry);
+CREATE INDEX "nvk:naturvardsavtal_wkb_geometry_geom_idx" ON postgis."nvk:naturvardsavtal" USING gist (wkb_geometry);
 
 
 --
@@ -5404,6 +5397,13 @@ CREATE INDEX "sks:atervatningsavtal_wkb_geometry_geom_idx" ON postgis."sks:aterv
 CREATE INDEX "sks:naturvarde_wkb_geometry_geom_idx" ON postgis."sks:naturvarde" USING gist (wkb_geometry);
 
 
+--
+-- Name: sks:naturvardsavtal_wkb_geometry_geom_idx; Type: INDEX; Schema: postgis; Owner: webmap_import
+--
+
+CREATE INDEX "sks:naturvardsavtal_wkb_geometry_geom_idx" ON postgis."sks:naturvardsavtal" USING gist (wkb_geometry);
+
+
 --
 -- Name: sks:nyckelbiotop_storskogsbruk_wkb_geometry_geom_idx; Type: INDEX; Schema: postgis; Owner: webmap_import
 --
@@ -5817,31 +5817,17 @@ GRANT SELECT,USAGE ON SEQUENCE postgis."mrr:ut_olja_gas_diamant_forfallna_ogc_fi
 
 
 --
--- Name: TABLE "nva:Naturvardsverket_Lansstyrelse"; Type: ACL; Schema: postgis; Owner: webmap_import
---
-
-GRANT SELECT ON TABLE postgis."nva:Naturvardsverket_Lansstyrelse" TO webmap_guest;
-
-
---
--- Name: SEQUENCE "nva:Naturvardsverket_Lansstyrelse_ogc_fid_seq"; Type: ACL; Schema: postgis; Owner: webmap_import
---
-
-GRANT SELECT,USAGE ON SEQUENCE postgis."nva:Naturvardsverket_Lansstyrelse_ogc_fid_seq" TO webmap_guest;
-
-
---
--- Name: TABLE "nva:Skogsstyrelsen"; Type: ACL; Schema: postgis; Owner: webmap_import
+-- Name: TABLE "nvk:naturvardsavtal"; Type: ACL; Schema: postgis; Owner: webmap_import
 --
 
-GRANT SELECT ON TABLE postgis."nva:Skogsstyrelsen" TO webmap_guest;
+GRANT SELECT ON TABLE postgis."nvk:naturvardsavtal" TO webmap_guest;
 
 
 --
--- Name: SEQUENCE "nva:Skogsstyrelsen_ogc_fid_seq"; Type: ACL; Schema: postgis; Owner: webmap_import
+-- Name: SEQUENCE "nvk:naturvardsavtal_ogc_fid_seq"; Type: ACL; Schema: postgis; Owner: webmap_import
 --
 
-GRANT SELECT,USAGE ON SEQUENCE postgis."nva:Skogsstyrelsen_ogc_fid_seq" TO webmap_guest;
+GRANT SELECT,USAGE ON SEQUENCE postgis."nvk:naturvardsavtal_ogc_fid_seq" TO webmap_guest;
 
 
 --
@@ -6320,6 +6306,20 @@ GRANT SELECT ON TABLE postgis."sks:naturvarde" TO webmap_guest;
 GRANT SELECT,USAGE ON SEQUENCE postgis."sks:naturvarde_ogc_fid_seq" TO webmap_guest;
 
 
+--
+-- Name: TABLE "sks:naturvardsavtal"; Type: ACL; Schema: postgis; Owner: webmap_import
+--
+
+GRANT SELECT ON TABLE postgis."sks:naturvardsavtal" TO webmap_guest;
+
+
+--
+-- Name: SEQUENCE "sks:naturvardsavtal_ogc_fid_seq"; Type: ACL; Schema: postgis; Owner: webmap_import
+--
+
+GRANT SELECT,USAGE ON SEQUENCE postgis."sks:naturvardsavtal_ogc_fid_seq" TO webmap_guest;
+
+
 --
 -- Name: TABLE "sks:nyckelbiotop"; Type: ACL; Schema: postgis; Owner: webmap_import
 --
-- 
cgit v1.2.3

