Add schema of common-data metadata tables #136
pg_dump -U postgres --schema-only --table=meta_dataset cartodb_user_db > meta_dataset.sql pg_dump -U postgres --schema-only --table=meta_category cartodb_user_db > meta_category.sql
This commit is contained in:
parent
0673f7d3be
commit
4dece40beb
13
common-data/meta_category.sql
Normal file
13
common-data/meta_category.sql
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
--
|
||||||
|
-- Name: meta_category; Type: TABLE; Schema: public
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE TABLE meta_category (
|
||||||
|
cartodb_id integer NOT NULL,
|
||||||
|
name text,
|
||||||
|
created_at timestamp with time zone DEFAULT now() NOT NULL,
|
||||||
|
updated_at timestamp with time zone DEFAULT now() NOT NULL,
|
||||||
|
the_geom geometry(Geometry,4326),
|
||||||
|
the_geom_webmercator geometry(Geometry,3857),
|
||||||
|
image_url text
|
||||||
|
);
|
21
common-data/meta_dataset.sql
Normal file
21
common-data/meta_dataset.sql
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
--
|
||||||
|
-- Name: meta_dataset; Type: TABLE; Schema: public
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE TABLE meta_dataset (
|
||||||
|
cartodb_id integer NOT NULL,
|
||||||
|
name text,
|
||||||
|
description text,
|
||||||
|
created_at timestamp with time zone DEFAULT now() NOT NULL,
|
||||||
|
updated_at timestamp with time zone DEFAULT now() NOT NULL,
|
||||||
|
the_geom geometry(Geometry,4326),
|
||||||
|
the_geom_webmercator geometry(Geometry,3857),
|
||||||
|
source text,
|
||||||
|
license text,
|
||||||
|
meta_category_id integer,
|
||||||
|
tabname text,
|
||||||
|
geometry_types text
|
||||||
|
);
|
||||||
|
|
||||||
|
ALTER TABLE ONLY meta_dataset
|
||||||
|
ADD CONSTRAINT meta_dataset_meta_category_id_fkey FOREIGN KEY (meta_category_id) REFERENCES meta_category(cartodb_id);
|
Loading…
Reference in New Issue
Block a user