aboutsummaryrefslogtreecommitdiffstats
path: root/schema.sql
diff options
context:
space:
mode:
Diffstat (limited to 'schema.sql')
-rw-r--r--schema.sql314
1 files changed, 314 insertions, 0 deletions
diff --git a/schema.sql b/schema.sql
index 6b4e773..f4f90df 100644
--- a/schema.sql
+++ b/schema.sql
@@ -639,6 +639,196 @@ ALTER SEQUENCE postgis."sks:UtfordAvverk_ogc_fid_seq" OWNED BY postgis."sks:Utfo
--
+-- Name: vbk:havsbaserad_vindkraft; Type: TABLE; Schema: postgis; Owner: webmap_import
+--
+
+CREATE TABLE postgis."vbk:havsbaserad_vindkraft" (
+ ogc_fid bigint NOT NULL,
+ "OmrID" character(10) NOT NULL,
+ "Projektnamn" character varying(62),
+ "Organisationsnamn" character varying(254),
+ "Organisationsnummer" character(11),
+ "Projektstatus" character varying(62) NOT NULL,
+ "Diarienummer" character varying(254),
+ "AndringsansokanPagar" boolean,
+ "SamradsunderlagInlamnat" date,
+ "AnsokanInlamnat" date,
+ "AnsokanAterkallad" date,
+ "AnsokanBeviljad" date,
+ "AnsokanAvslagen" date,
+ "AnsokanOverklagad" date,
+ "Natura2000_Ansokan" character varying(62) NOT NULL,
+ "Natura2000_Beslutdatum" date,
+ "UnderByggnation" boolean,
+ "Uppfort" date,
+ "PlaneratAntalVerkMin" smallint,
+ "PlaneratAntalVerkMax" smallint,
+ "PlaneradHojdMin" smallint,
+ "PlaneradHojdMax" smallint,
+ "PlaneradProduktionMin" real,
+ "PlaneradProduktionMax" real,
+ "PlaneradByggstart" date,
+ "PlaneratDrift" date,
+ "BeviljatAntalVerk" smallint,
+ "UppfortAntalVerk" smallint,
+ "BeviljadMaxhojd" smallint,
+ "InstalleradEffekt" real,
+ "Calprod" real,
+ "ElNamn" character varying(62) NOT NULL,
+ "SenasteUppdaterat" date NOT NULL,
+ "Raderat" boolean NOT NULL,
+ wkb_geometry postgis.geometry(MultiPolygon,3006)
+);
+
+
+ALTER TABLE postgis."vbk:havsbaserad_vindkraft" OWNER TO webmap_import;
+
+--
+-- Name: TABLE "vbk:havsbaserad_vindkraft"; Type: COMMENT; Schema: postgis; Owner: webmap_import
+--
+
+COMMENT ON TABLE postgis."vbk:havsbaserad_vindkraft" IS 'Vindbrukskollen havsbaserad vindkraft (Länsstyrelsen)';
+
+
+--
+-- Name: vbk:havsbaserad_vindkraft_ogc_fid_seq; Type: SEQUENCE; Schema: postgis; Owner: webmap_import
+--
+
+CREATE SEQUENCE postgis."vbk:havsbaserad_vindkraft_ogc_fid_seq"
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+
+ALTER TABLE postgis."vbk:havsbaserad_vindkraft_ogc_fid_seq" OWNER TO webmap_import;
+
+--
+-- Name: vbk:havsbaserad_vindkraft_ogc_fid_seq; Type: SEQUENCE OWNED BY; Schema: postgis; Owner: webmap_import
+--
+
+ALTER SEQUENCE postgis."vbk:havsbaserad_vindkraft_ogc_fid_seq" OWNED BY postgis."vbk:havsbaserad_vindkraft".ogc_fid;
+
+
+--
+-- Name: vbk:projekteringsomraden; Type: TABLE; Schema: postgis; Owner: webmap_import
+--
+
+CREATE TABLE postgis."vbk:projekteringsomraden" (
+ ogc_fid bigint NOT NULL,
+ "OmrID" character(10) NOT NULL,
+ "Projektnamn" character varying(62),
+ "AntalVerk" smallint NOT NULL,
+ "AntalEjXY" smallint NOT NULL,
+ "Calprod" real,
+ "PlaneradByggstart" date,
+ "PlaneratDrift" date,
+ "AndringsansokanPagar" boolean,
+ "UnderByggnation" boolean,
+ "Organisationsnamn" character varying(254),
+ "Organisationsnummer" character(11),
+ "ElNamn" character varying(62) NOT NULL,
+ "SenasteUppdaterat" date,
+ "EjAktuell" boolean NOT NULL,
+ "Raderat" boolean NOT NULL,
+ wkb_geometry postgis.geometry(MultiPolygon,3006)
+);
+
+
+ALTER TABLE postgis."vbk:projekteringsomraden" OWNER TO webmap_import;
+
+--
+-- Name: TABLE "vbk:projekteringsomraden"; Type: COMMENT; Schema: postgis; Owner: webmap_import
+--
+
+COMMENT ON TABLE postgis."vbk:projekteringsomraden" IS 'Vindbrukskollen landbaserade projekteringsområden (Länsstyrelsen)';
+
+
+--
+-- Name: vbk:projekteringsomraden_ogc_fid_seq; Type: SEQUENCE; Schema: postgis; Owner: webmap_import
+--
+
+CREATE SEQUENCE postgis."vbk:projekteringsomraden_ogc_fid_seq"
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+
+ALTER TABLE postgis."vbk:projekteringsomraden_ogc_fid_seq" OWNER TO webmap_import;
+
+--
+-- Name: vbk:projekteringsomraden_ogc_fid_seq; Type: SEQUENCE OWNED BY; Schema: postgis; Owner: webmap_import
+--
+
+ALTER SEQUENCE postgis."vbk:projekteringsomraden_ogc_fid_seq" OWNED BY postgis."vbk:projekteringsomraden".ogc_fid;
+
+
+--
+-- Name: vbk:vindkraftverk; Type: TABLE; Schema: postgis; Owner: webmap_import
+--
+
+CREATE TABLE postgis."vbk:vindkraftverk" (
+ ogc_fid bigint NOT NULL,
+ "VerkID" character(14) NOT NULL,
+ "OmrID" character(10) NOT NULL,
+ "Projektnamn" character varying(62),
+ "Status" character varying(62) NOT NULL,
+ "Statuskod" smallint NOT NULL,
+ "Handlingstyp" character varying(62),
+ "Uppfort" date,
+ "MB_Tillstand" date,
+ "Totalhojd" smallint,
+ "Navhojd" smallint,
+ "Rotordiameter" smallint,
+ "Maxeffekt" real,
+ "Calprod" real,
+ "Fabrikat" character varying(62),
+ "Modell" character varying(62),
+ "Organisationsnamn" character varying(254),
+ "Organisationsnummer" character(11),
+ "Placering" character varying(62),
+ "ElNamn" character varying(62) NOT NULL,
+ "SenasteUppdaterat" date,
+ "EjAktuell" boolean,
+ "Raderat" boolean NOT NULL,
+ wkb_geometry postgis.geometry(Point,3006)
+);
+
+
+ALTER TABLE postgis."vbk:vindkraftverk" OWNER TO webmap_import;
+
+--
+-- Name: TABLE "vbk:vindkraftverk"; Type: COMMENT; Schema: postgis; Owner: webmap_import
+--
+
+COMMENT ON TABLE postgis."vbk:vindkraftverk" IS 'Vindbrukskollen landbaserade vindkraftverk (Länsstyrelsen)';
+
+
+--
+-- Name: vbk:vindkraftverk_ogc_fid_seq; Type: SEQUENCE; Schema: postgis; Owner: webmap_import
+--
+
+CREATE SEQUENCE postgis."vbk:vindkraftverk_ogc_fid_seq"
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+
+ALTER TABLE postgis."vbk:vindkraftverk_ogc_fid_seq" OWNER TO webmap_import;
+
+--
+-- Name: vbk:vindkraftverk_ogc_fid_seq; Type: SEQUENCE OWNED BY; Schema: postgis; Owner: webmap_import
+--
+
+ALTER SEQUENCE postgis."vbk:vindkraftverk_ogc_fid_seq" OWNED BY postgis."vbk:vindkraftverk".ogc_fid;
+
+
+--
-- Name: kommunyta ogc_fid; Type: DEFAULT; Schema: postgis; Owner: webmap_import
--
@@ -723,6 +913,27 @@ ALTER TABLE ONLY postgis."sks:UtfordAvverk" ALTER COLUMN ogc_fid SET DEFAULT nex
--
+-- Name: vbk:havsbaserad_vindkraft ogc_fid; Type: DEFAULT; Schema: postgis; Owner: webmap_import
+--
+
+ALTER TABLE ONLY postgis."vbk:havsbaserad_vindkraft" ALTER COLUMN ogc_fid SET DEFAULT nextval('postgis."vbk:havsbaserad_vindkraft_ogc_fid_seq"'::regclass);
+
+
+--
+-- Name: vbk:projekteringsomraden ogc_fid; Type: DEFAULT; Schema: postgis; Owner: webmap_import
+--
+
+ALTER TABLE ONLY postgis."vbk:projekteringsomraden" ALTER COLUMN ogc_fid SET DEFAULT nextval('postgis."vbk:projekteringsomraden_ogc_fid_seq"'::regclass);
+
+
+--
+-- Name: vbk:vindkraftverk ogc_fid; Type: DEFAULT; Schema: postgis; Owner: webmap_import
+--
+
+ALTER TABLE ONLY postgis."vbk:vindkraftverk" ALTER COLUMN ogc_fid SET DEFAULT nextval('postgis."vbk:vindkraftverk_ogc_fid_seq"'::regclass);
+
+
+--
-- Name: kommunyta kommunyta_kommunkod_key; Type: CONSTRAINT; Schema: postgis; Owner: webmap_import
--
@@ -1019,6 +1230,46 @@ ALTER TABLE ONLY postgis."sks:UtfordAvverk"
--
+-- Name: vbk:havsbaserad_vindkraft vbk:havsbaserad_vindkraft_pkey; Type: CONSTRAINT; Schema: postgis; Owner: webmap_import
+--
+
+ALTER TABLE ONLY postgis."vbk:havsbaserad_vindkraft"
+ ADD CONSTRAINT "vbk:havsbaserad_vindkraft_pkey" PRIMARY KEY (ogc_fid);
+
+
+--
+-- Name: vbk:projekteringsomraden vbk:projekteringsomraden_OmrID_key; Type: CONSTRAINT; Schema: postgis; Owner: webmap_import
+--
+
+ALTER TABLE ONLY postgis."vbk:projekteringsomraden"
+ ADD CONSTRAINT "vbk:projekteringsomraden_OmrID_key" UNIQUE ("OmrID");
+
+
+--
+-- Name: vbk:projekteringsomraden vbk:projekteringsomraden_pkey; Type: CONSTRAINT; Schema: postgis; Owner: webmap_import
+--
+
+ALTER TABLE ONLY postgis."vbk:projekteringsomraden"
+ ADD CONSTRAINT "vbk:projekteringsomraden_pkey" PRIMARY KEY (ogc_fid);
+
+
+--
+-- Name: vbk:vindkraftverk vbk:vindkraftverk_VerkID_key; Type: CONSTRAINT; Schema: postgis; Owner: webmap_import
+--
+
+ALTER TABLE ONLY postgis."vbk:vindkraftverk"
+ ADD CONSTRAINT "vbk:vindkraftverk_VerkID_key" UNIQUE ("VerkID");
+
+
+--
+-- Name: vbk:vindkraftverk vbk:vindkraftverk_pkey; Type: CONSTRAINT; Schema: postgis; Owner: webmap_import
+--
+
+ALTER TABLE ONLY postgis."vbk:vindkraftverk"
+ ADD CONSTRAINT "vbk:vindkraftverk_pkey" PRIMARY KEY (ogc_fid);
+
+
+--
-- Name: kommunyta_wkb_geometry_geom_idx; Type: INDEX; Schema: postgis; Owner: webmap_import
--
@@ -1103,6 +1354,27 @@ CREATE INDEX "sks:UtfordAvverk_wkb_geometry_geom_idx" ON postgis."sks:UtfordAvve
--
+-- Name: vbk:havsbaserad_vindkraft_wkb_geometry_geom_idx; Type: INDEX; Schema: postgis; Owner: webmap_import
+--
+
+CREATE INDEX "vbk:havsbaserad_vindkraft_wkb_geometry_geom_idx" ON postgis."vbk:havsbaserad_vindkraft" USING gist (wkb_geometry);
+
+
+--
+-- Name: vbk:projekteringsomraden_wkb_geometry_geom_idx; Type: INDEX; Schema: postgis; Owner: webmap_import
+--
+
+CREATE INDEX "vbk:projekteringsomraden_wkb_geometry_geom_idx" ON postgis."vbk:projekteringsomraden" USING gist (wkb_geometry);
+
+
+--
+-- Name: vbk:vindkraftverk_wkb_geometry_geom_idx; Type: INDEX; Schema: postgis; Owner: webmap_import
+--
+
+CREATE INDEX "vbk:vindkraftverk_wkb_geometry_geom_idx" ON postgis."vbk:vindkraftverk" USING gist (wkb_geometry);
+
+
+--
-- Name: DATABASE webmap; Type: ACL; Schema: -; Owner: postgres
--
@@ -1308,6 +1580,48 @@ GRANT SELECT ON TABLE postgis.spatial_ref_sys TO webmap_guest;
--
+-- Name: TABLE "vbk:havsbaserad_vindkraft"; Type: ACL; Schema: postgis; Owner: webmap_import
+--
+
+GRANT SELECT ON TABLE postgis."vbk:havsbaserad_vindkraft" TO webmap_guest;
+
+
+--
+-- Name: SEQUENCE "vbk:havsbaserad_vindkraft_ogc_fid_seq"; Type: ACL; Schema: postgis; Owner: webmap_import
+--
+
+GRANT SELECT,USAGE ON SEQUENCE postgis."vbk:havsbaserad_vindkraft_ogc_fid_seq" TO webmap_guest;
+
+
+--
+-- Name: TABLE "vbk:projekteringsomraden"; Type: ACL; Schema: postgis; Owner: webmap_import
+--
+
+GRANT SELECT ON TABLE postgis."vbk:projekteringsomraden" TO webmap_guest;
+
+
+--
+-- Name: SEQUENCE "vbk:projekteringsomraden_ogc_fid_seq"; Type: ACL; Schema: postgis; Owner: webmap_import
+--
+
+GRANT SELECT,USAGE ON SEQUENCE postgis."vbk:projekteringsomraden_ogc_fid_seq" TO webmap_guest;
+
+
+--
+-- Name: TABLE "vbk:vindkraftverk"; Type: ACL; Schema: postgis; Owner: webmap_import
+--
+
+GRANT SELECT ON TABLE postgis."vbk:vindkraftverk" TO webmap_guest;
+
+
+--
+-- Name: SEQUENCE "vbk:vindkraftverk_ogc_fid_seq"; Type: ACL; Schema: postgis; Owner: webmap_import
+--
+
+GRANT SELECT,USAGE ON SEQUENCE postgis."vbk:vindkraftverk_ogc_fid_seq" TO webmap_guest;
+
+
+--
-- PostgreSQL database dump complete
--