diff options
Diffstat (limited to 'schema.sql')
-rw-r--r-- | schema.sql | 48 |
1 files changed, 23 insertions, 25 deletions
@@ -2751,32 +2751,30 @@ ALTER SEQUENCE postgis."vbk:vindkraftverk_ogc_fid_seq" OWNED BY postgis."vbk:vin -- --- Name: sourcecache; Type: TABLE; Schema: public; Owner: webmap_import +-- Name: layercache; Type: TABLE; Schema: public; Owner: webmap_import -- -CREATE TABLE public.sourcecache ( +CREATE TABLE public.layercache ( ogc_fid bigint NOT NULL, - source_path character varying(2047) NOT NULL, - archive_member character varying(2047) NOT NULL, layername character varying(255) NOT NULL, - mtime_ns bigint + last_updated timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL ); -ALTER TABLE public.sourcecache OWNER TO webmap_import; +ALTER TABLE public.layercache OWNER TO webmap_import; -- --- Name: TABLE sourcecache; Type: COMMENT; Schema: public; Owner: webmap_import +-- Name: TABLE layercache; Type: COMMENT; Schema: public; Owner: webmap_import -- -COMMENT ON TABLE public.sourcecache IS 'Metadata cache for sources files'; +COMMENT ON TABLE public.layercache IS 'Layer metadata cache'; -- --- Name: sourcecache_ogc_fid_seq; Type: SEQUENCE; Schema: public; Owner: webmap_import +-- Name: layercache_ogc_fid_seq; Type: SEQUENCE; Schema: public; Owner: webmap_import -- -CREATE SEQUENCE public.sourcecache_ogc_fid_seq +CREATE SEQUENCE public.layercache_ogc_fid_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -2784,13 +2782,13 @@ CREATE SEQUENCE public.sourcecache_ogc_fid_seq CACHE 1; -ALTER TABLE public.sourcecache_ogc_fid_seq OWNER TO webmap_import; +ALTER TABLE public.layercache_ogc_fid_seq OWNER TO webmap_import; -- --- Name: sourcecache_ogc_fid_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: webmap_import +-- Name: layercache_ogc_fid_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: webmap_import -- -ALTER SEQUENCE public.sourcecache_ogc_fid_seq OWNED BY public.sourcecache.ogc_fid; +ALTER SEQUENCE public.layercache_ogc_fid_seq OWNED BY public.layercache.ogc_fid; -- @@ -3165,10 +3163,10 @@ ALTER TABLE ONLY postgis."vbk:vindkraftverk" ALTER COLUMN ogc_fid SET DEFAULT ne -- --- Name: sourcecache ogc_fid; Type: DEFAULT; Schema: public; Owner: webmap_import +-- Name: layercache ogc_fid; Type: DEFAULT; Schema: public; Owner: webmap_import -- -ALTER TABLE ONLY public.sourcecache ALTER COLUMN ogc_fid SET DEFAULT nextval('public.sourcecache_ogc_fid_seq'::regclass); +ALTER TABLE ONLY public.layercache ALTER COLUMN ogc_fid SET DEFAULT nextval('public.layercache_ogc_fid_seq'::regclass); -- @@ -4044,19 +4042,19 @@ ALTER TABLE ONLY postgis."vbk:vindkraftverk" -- --- Name: sourcecache sourcecache_pkey; Type: CONSTRAINT; Schema: public; Owner: webmap_import +-- Name: layercache layercache_layername_key; Type: CONSTRAINT; Schema: public; Owner: webmap_import -- -ALTER TABLE ONLY public.sourcecache - ADD CONSTRAINT sourcecache_pkey PRIMARY KEY (ogc_fid); +ALTER TABLE ONLY public.layercache + ADD CONSTRAINT layercache_layername_key UNIQUE (layername); -- --- Name: sourcecache sourcecache_source_path_archive_member_layername_key; Type: CONSTRAINT; Schema: public; Owner: webmap_import +-- Name: layercache layercache_pkey; Type: CONSTRAINT; Schema: public; Owner: webmap_import -- -ALTER TABLE ONLY public.sourcecache - ADD CONSTRAINT sourcecache_source_path_archive_member_layername_key UNIQUE (source_path, archive_member, layername); +ALTER TABLE ONLY public.layercache + ADD CONSTRAINT layercache_pkey PRIMARY KEY (ogc_fid); -- @@ -5210,17 +5208,17 @@ GRANT SELECT,USAGE ON SEQUENCE postgis."vbk:vindkraftverk_ogc_fid_seq" TO webmap -- --- Name: TABLE sourcecache; Type: ACL; Schema: public; Owner: webmap_import +-- Name: TABLE layercache; Type: ACL; Schema: public; Owner: webmap_import -- -GRANT SELECT ON TABLE public.sourcecache TO webmap_guest; +GRANT SELECT ON TABLE public.layercache TO webmap_guest; -- --- Name: SEQUENCE sourcecache_ogc_fid_seq; Type: ACL; Schema: public; Owner: webmap_import +-- Name: SEQUENCE layercache_ogc_fid_seq; Type: ACL; Schema: public; Owner: webmap_import -- -GRANT SELECT,USAGE ON SEQUENCE public.sourcecache_ogc_fid_seq TO webmap_guest; +GRANT SELECT,USAGE ON SEQUENCE public.layercache_ogc_fid_seq TO webmap_guest; -- |