Added ERD Diagram support with basic table fields, primary key, foreign key, and DDL SQL generation. Fixes #1802

This commit is contained in:
Aditya Toshniwal
2021-01-16 17:06:50 +05:30
committed by Akshay Joshi
parent 065bda37b4
commit 0c8226ff39
78 changed files with 9289 additions and 1472 deletions
@@ -0,0 +1,25 @@
CREATE TABLE public.newtable1
(
id integer,
col1 character varying(50),
PRIMARY KEY (id)
);
CREATE TABLE public.newtable2
(
table1_id integer,
col2 character varying(50),
PRIMARY KEY (id)
);
CREATE TABLE public.newtable3
(
)
;
ALTER TABLE public.newtable2
ADD FOREIGN KEY (table1_id)
REFERENCES public.newtable1 (id)
NOT VALID;
@@ -0,0 +1,34 @@
CREATE TABLE public.newtable1
(
id integer,
col1 character varying(50),
PRIMARY KEY (id)
)
WITH (
OIDS = FALSE
);
CREATE TABLE public.newtable2
(
table1_id integer,
col2 character varying(50),
PRIMARY KEY (id)
)
WITH (
OIDS = FALSE
);
CREATE TABLE public.newtable3
(
)
WITH (
OIDS = FALSE
);
ALTER TABLE public.newtable2
ADD FOREIGN KEY (table1_id)
REFERENCES public.newtable1 (id)
NOT VALID;