aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2026-03-05 14:04:56 +0100
committerGuilhem Moulin <guilhem@fripost.org>2026-03-05 14:04:56 +0100
commitc01f8ca0b0e33b472c17c762cf51bff6862a05fb (patch)
treed9f676b61aef3bc5f11c007b1aa0d4bf687b8d39
parentd2c1d45a7b1245097aac2a424eface32bd77370e (diff)
schema.sql: DROP some NOT NULL and UNIQUE contraints.
To match the layer definition found upstream.
-rw-r--r--config.yml6
-rw-r--r--schema.sql45
2 files changed, 36 insertions, 15 deletions
diff --git a/config.yml b/config.yml
index b07f57c..ab823d3 100644
--- a/config.yml
+++ b/config.yml
@@ -1013,7 +1013,7 @@ layers:
comment: Beslutsstatus
- name: URSBESLDAT
type: Date
- nullable: false
+ nullable: true
comment: Ursprungligt beslutsdatum
- name: IKRAFTDATF
type: Date
@@ -1033,7 +1033,7 @@ layers:
- name: FORVALTARE
type: String
width: 62
- nullable: false
+ nullable: true
comment: Förvaltare för området
- name: LAND_HA
# XXX convert to m²?
@@ -3690,7 +3690,7 @@ layers:
fields:
- name: name
type: String
- unique: true
+ #unique: true
nullable: false
width: 254
comment: Namn på ansökt undersökningsområde
diff --git a/schema.sql b/schema.sql
index 49e02dc..1011e3e 100644
--- a/schema.sql
+++ b/schema.sql
@@ -2,8 +2,10 @@
-- PostgreSQL database dump
--
--- Dumped from database version 17.5 (Debian 17.5-1)
--- Dumped by pg_dump version 17.5 (Debian 17.5-1)
+\restrict Bgzdbx4Rtx4vQfqXsTo49OzxtEB1IfCKRtQILnb5nJbZHUD1Sfo8KdPcqvthM16
+
+-- Dumped from database version 17.8 (Debian 17.8-0+deb13u1)
+-- Dumped by pg_dump version 17.8 (Debian 17.8-0+deb13u1)
SET statement_timeout = 0;
SET lock_timeout = 0;
@@ -27,7 +29,9 @@ CREATE DATABASE webmap WITH TEMPLATE = template0 ENCODING = 'UTF8' LOCALE_PROVID
ALTER DATABASE webmap OWNER TO postgres;
+\unrestrict Bgzdbx4Rtx4vQfqXsTo49OzxtEB1IfCKRtQILnb5nJbZHUD1Sfo8KdPcqvthM16
\connect webmap
+\restrict Bgzdbx4Rtx4vQfqXsTo49OzxtEB1IfCKRtQILnb5nJbZHUD1Sfo8KdPcqvthM16
SET statement_timeout = 0;
SET lock_timeout = 0;
@@ -49,6 +53,29 @@ COMMENT ON DATABASE webmap IS 'Backend PostGIS database for KlimatanalysNorr too
--
+-- Name: webmap; Type: DATABASE PROPERTIES; Schema: -; Owner: postgres
+--
+
+ALTER DATABASE webmap SET search_path TO 'public';
+
+
+\unrestrict Bgzdbx4Rtx4vQfqXsTo49OzxtEB1IfCKRtQILnb5nJbZHUD1Sfo8KdPcqvthM16
+\connect webmap
+\restrict Bgzdbx4Rtx4vQfqXsTo49OzxtEB1IfCKRtQILnb5nJbZHUD1Sfo8KdPcqvthM16
+
+SET statement_timeout = 0;
+SET lock_timeout = 0;
+SET idle_in_transaction_session_timeout = 0;
+SET transaction_timeout = 0;
+SET client_encoding = 'UTF8';
+SET standard_conforming_strings = on;
+SELECT pg_catalog.set_config('search_path', '', false);
+SET check_function_bodies = false;
+SET xmloption = content;
+SET client_min_messages = warning;
+SET row_security = off;
+
+--
-- Name: postgis; Type: SCHEMA; Schema: -; Owner: postgres
--
@@ -3933,12 +3960,12 @@ CREATE TABLE postgis."nvr:Naturreservat" (
"NAMN" character varying(128) NOT NULL,
"SKYDDSTYP" character varying(32) NOT NULL,
"BESLSTATUS" character varying(12) NOT NULL,
- "URSBESLDAT" date NOT NULL,
+ "URSBESLDAT" date,
"IKRAFTDATF" date,
"URSGALLDAT" date,
"SENGALLDAT" date,
"IUCNKAT" character varying(254) NOT NULL,
- "FORVALTARE" character varying(62) NOT NULL,
+ "FORVALTARE" character varying(62),
"LAND_HA" double precision,
"VATTEN_HA" double precision,
"SKOG_HA" double precision,
@@ -7569,14 +7596,6 @@ ALTER TABLE ONLY postgis."mrr:ut_metaller_industrimineral_ansokta"
--
--- Name: mrr:ut_metaller_industrimineral_ansokta mrr:ut_metaller_industrimineral_ansokta_name_key; Type: CONSTRAINT; Schema: postgis; Owner: webmap_import
---
-
-ALTER TABLE ONLY postgis."mrr:ut_metaller_industrimineral_ansokta"
- ADD CONSTRAINT "mrr:ut_metaller_industrimineral_ansokta_name_key" UNIQUE (name);
-
-
---
-- Name: mrr:ut_metaller_industrimineral_ansokta mrr:ut_metaller_industrimineral_ansokta_pkey; Type: CONSTRAINT; Schema: postgis; Owner: webmap_import
--
@@ -9882,3 +9901,5 @@ GRANT SELECT,USAGE ON SEQUENCE public.layercache_ogc_fid_seq TO webmap_guest;
-- PostgreSQL database dump complete
--
+\unrestrict Bgzdbx4Rtx4vQfqXsTo49OzxtEB1IfCKRtQILnb5nJbZHUD1Sfo8KdPcqvthM16
+