Show connected nodes
This commit is contained in:
parent
c3f8bedea1
commit
dff17cad5b
7 changed files with 212 additions and 6 deletions
11
sql/0005.sql
Normal file
11
sql/0005.sql
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
DROP TABLE public."connection";
|
||||
|
||||
CREATE TABLE public."connection" (
|
||||
id serial NOT NULL,
|
||||
"from" int4 NOT NULL,
|
||||
"to" int4 NOT NULL,
|
||||
updated timestamptz DEFAULT NOW() NOT NULL,
|
||||
CONSTRAINT newtable_pk PRIMARY KEY (id),
|
||||
CONSTRAINT connection_node_fk FOREIGN KEY ("from") REFERENCES public.node(id) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
CONSTRAINT connection_node_fk_1 FOREIGN KEY ("to") REFERENCES public.node(id) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
);
|
||||
Loading…
Add table
Add a link
Reference in a new issue