dbSchema/model/ddl_3_topologic.sql

29 lines
892 B
SQL

-- Table: public.topologic
DROP TABLE IF EXISTS public.topologic;
DROP SEQUENCE IF EXISTS public.topologic_id_seq;
CREATE SEQUENCE IF NOT EXISTS public.topologic_id_seq;
CREATE TABLE IF NOT EXISTS public.topologic
(
id integer NOT NULL DEFAULT nextval('topologic_id_seq'::regclass),
uuid_from uuid,
uuid_to uuid,
from_pin uuid,
to_pin uuid,
flag integer DEFAULT 0,
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
)
TABLESPACE pg_default;
ALTER TABLE IF EXISTS public.topologic
OWNER to postgres;