add and update
This commit is contained in:
parent
d2fb604894
commit
b7ff89be60
|
|
@ -0,0 +1,9 @@
|
|||
-- standard component type
|
||||
|
||||
DROP TABLE IF EXISTS COMPONENT_TYPE;
|
||||
|
||||
CREATE TABLE 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 MEASUREMENT;
|
||||
|
||||
CREATE TABLE (
|
||||
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,
|
||||
op integer NOT NULL DEFAULT '-1'::integer,
|
||||
ts timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
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
|
||||
CONSTRAINT component_id_PrimaryKey PRIMARY KEY (id)
|
||||
)
|
||||
|
||||
TABLESPACE pg_default;
|
||||
|
|
|
|||
|
|
@ -16,11 +16,7 @@ CREATE TABLE IF NOT EXISTS public.topologic
|
|||
description character varying(512) COLLATE pg_catalog."default",
|
||||
op integer NOT NULL DEFAULT '-1'::integer,
|
||||
ts timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
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
|
||||
CONSTRAINT topologic_id_PrimaryKey PRIMARY KEY (id)
|
||||
)
|
||||
|
||||
TABLESPACE pg_default;
|
||||
|
|
|
|||
Loading…
Reference in New Issue