Show connected nodes

This commit is contained in:
Magnus Åhall 2025-07-07 21:44:09 +02:00
parent c3f8bedea1
commit dff17cad5b
7 changed files with 212 additions and 6 deletions

11
sql/0005.sql Normal file
View 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
);