parent
d2fb604894
commit
fa1ebe5386
|
|
@ -0,0 +1,9 @@
|
||||||
|
-- standard component type
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS PUBLIC.COMPONENT_TYPE;
|
||||||
|
|
||||||
|
CREATE TABLE PUBLIC.COMPONENT_TYPE (
|
||||||
|
ID SERIAL PRIMARY KEY,
|
||||||
|
TYPE VARCHAR(64) NOT NULL DEFAULT '',
|
||||||
|
NAME VARCHAR(64) NOT NULL DEFAULT ''
|
||||||
|
);
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
-- measurement of bay
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS PUBLIC.MEASUREMENT;
|
||||||
|
|
||||||
|
CREATE TABLE PUBLIC.MEASUREMENT (
|
||||||
|
ID SERIAL PRIMARY KEY,
|
||||||
|
TAG VARCHAR(64) NOT NULL DEFAULT '',
|
||||||
|
NAME VARCHAR(64) NOT NULL DEFAULT '',
|
||||||
|
BAY_ID INTEGER NOT NULL DEFAULT -1
|
||||||
|
);
|
||||||
|
|
@ -29,11 +29,7 @@ CREATE TABLE IF NOT EXISTS public.component
|
||||||
context jsonb NOT NULL DEFAULT '{}'::jsonb,
|
context jsonb NOT NULL DEFAULT '{}'::jsonb,
|
||||||
op integer NOT NULL DEFAULT '-1'::integer,
|
op integer NOT NULL DEFAULT '-1'::integer,
|
||||||
ts timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
ts timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||||
CONSTRAINT component_id_PrimaryKey PRIMARY KEY (id),
|
CONSTRAINT component_id_PrimaryKey PRIMARY KEY (id)
|
||||||
CONSTRAINT component_ForeignKey_page_id FOREIGN KEY (page_id)
|
|
||||||
REFERENCES public.page (id) MATCH SIMPLE
|
|
||||||
ON UPDATE NO ACTION
|
|
||||||
ON DELETE NO ACTION
|
|
||||||
)
|
)
|
||||||
|
|
||||||
TABLESPACE pg_default;
|
TABLESPACE pg_default;
|
||||||
|
|
|
||||||
|
|
@ -16,11 +16,7 @@ CREATE TABLE IF NOT EXISTS public.topologic
|
||||||
description character varying(512) COLLATE pg_catalog."default",
|
description character varying(512) COLLATE pg_catalog."default",
|
||||||
op integer NOT NULL DEFAULT '-1'::integer,
|
op integer NOT NULL DEFAULT '-1'::integer,
|
||||||
ts timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
ts timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||||
CONSTRAINT topologic_id_PrimaryKey PRIMARY KEY (id),
|
CONSTRAINT topologic_id_PrimaryKey PRIMARY KEY (id)
|
||||||
CONSTRAINT topologic_ForeignKey_page_id FOREIGN KEY (page_id)
|
|
||||||
REFERENCES public.page (id) MATCH SIMPLE
|
|
||||||
ON UPDATE NO ACTION
|
|
||||||
ON DELETE NO ACTION
|
|
||||||
)
|
)
|
||||||
|
|
||||||
TABLESPACE pg_default;
|
TABLESPACE pg_default;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue