From c7998694e4de61cc32383f9c9e1a796155796b28 Mon Sep 17 00:00:00 2001
From: Guilhem Moulin <guilhem@fripost.org>
Date: Sat, 19 Oct 2024 19:07:11 +0200
Subject: Add layer with planed gigafactories.

Own work.
---
 schema.sql | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 78 insertions(+)

(limited to 'schema.sql')

diff --git a/schema.sql b/schema.sql
index 78429a1..7208a34 100644
--- a/schema.sql
+++ b/schema.sql
@@ -73,6 +73,48 @@ SET default_tablespace = '';
 
 SET default_table_access_method = heap;
 
+--
+-- Name: gigafactories; Type: TABLE; Schema: postgis; Owner: webmap_import
+--
+
+CREATE TABLE postgis.gigafactories (
+    ogc_fid bigint NOT NULL,
+    "Name" character varying(254),
+    "Url" character varying(254),
+    wkb_geometry postgis.geometry(MultiPolygon,3006)
+);
+
+
+ALTER TABLE postgis.gigafactories OWNER TO webmap_import;
+
+--
+-- Name: TABLE gigafactories; Type: COMMENT; Schema: postgis; Owner: webmap_import
+--
+
+COMMENT ON TABLE postgis.gigafactories IS 'Stora industrisatsningar';
+
+
+--
+-- Name: gigafactories_ogc_fid_seq; Type: SEQUENCE; Schema: postgis; Owner: webmap_import
+--
+
+CREATE SEQUENCE postgis.gigafactories_ogc_fid_seq
+    START WITH 1
+    INCREMENT BY 1
+    NO MINVALUE
+    NO MAXVALUE
+    CACHE 1;
+
+
+ALTER TABLE postgis.gigafactories_ogc_fid_seq OWNER TO webmap_import;
+
+--
+-- Name: gigafactories_ogc_fid_seq; Type: SEQUENCE OWNED BY; Schema: postgis; Owner: webmap_import
+--
+
+ALTER SEQUENCE postgis.gigafactories_ogc_fid_seq OWNED BY postgis.gigafactories.ogc_fid;
+
+
 --
 -- Name: kommunyta; Type: TABLE; Schema: postgis; Owner: webmap_import
 --
@@ -2641,6 +2683,13 @@ ALTER TABLE postgis."vbk:vindkraftverk_ogc_fid_seq" OWNER TO webmap_import;
 ALTER SEQUENCE postgis."vbk:vindkraftverk_ogc_fid_seq" OWNED BY postgis."vbk:vindkraftverk".ogc_fid;
 
 
+--
+-- Name: gigafactories ogc_fid; Type: DEFAULT; Schema: postgis; Owner: webmap_import
+--
+
+ALTER TABLE ONLY postgis.gigafactories ALTER COLUMN ogc_fid SET DEFAULT nextval('postgis.gigafactories_ogc_fid_seq'::regclass);
+
+
 --
 -- Name: kommunyta ogc_fid; Type: DEFAULT; Schema: postgis; Owner: webmap_import
 --
@@ -2998,6 +3047,14 @@ ALTER TABLE ONLY postgis."vbk:projekteringsomraden" ALTER COLUMN ogc_fid SET DEF
 ALTER TABLE ONLY postgis."vbk:vindkraftverk" ALTER COLUMN ogc_fid SET DEFAULT nextval('postgis."vbk:vindkraftverk_ogc_fid_seq"'::regclass);
 
 
+--
+-- Name: gigafactories gigafactories_pkey; Type: CONSTRAINT; Schema: postgis; Owner: webmap_import
+--
+
+ALTER TABLE ONLY postgis.gigafactories
+    ADD CONSTRAINT gigafactories_pkey PRIMARY KEY (ogc_fid);
+
+
 --
 -- Name: kommunyta kommunyta_kommunkod_key; Type: CONSTRAINT; Schema: postgis; Owner: webmap_import
 --
@@ -3870,6 +3927,13 @@ ALTER TABLE ONLY postgis."vbk:vindkraftverk"
     ADD CONSTRAINT "vbk:vindkraftverk_pkey" PRIMARY KEY (ogc_fid);
 
 
+--
+-- Name: gigafactories_wkb_geometry_geom_idx; Type: INDEX; Schema: postgis; Owner: webmap_import
+--
+
+CREATE INDEX gigafactories_wkb_geometry_geom_idx ON postgis.gigafactories USING gist (wkb_geometry);
+
+
 --
 -- Name: kommunyta_wkb_geometry_geom_idx; Type: INDEX; Schema: postgis; Owner: webmap_import
 --
@@ -4257,6 +4321,20 @@ GRANT SELECT ON TABLE postgis.geography_columns TO webmap_guest;
 GRANT SELECT ON TABLE postgis.geometry_columns TO webmap_guest;
 
 
+--
+-- Name: TABLE gigafactories; Type: ACL; Schema: postgis; Owner: webmap_import
+--
+
+GRANT SELECT ON TABLE postgis.gigafactories TO webmap_guest;
+
+
+--
+-- Name: SEQUENCE gigafactories_ogc_fid_seq; Type: ACL; Schema: postgis; Owner: webmap_import
+--
+
+GRANT SELECT,USAGE ON SEQUENCE postgis.gigafactories_ogc_fid_seq TO webmap_guest;
+
+
 --
 -- Name: TABLE kommunyta; Type: ACL; Schema: postgis; Owner: webmap_import
 --
-- 
cgit v1.2.3

