mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2026-08-05 02:43:27 -05:00
Added ERD Diagram support with basic table fields, primary key, foreign key, and DDL SQL generation. Fixes #1802
This commit is contained in:
committed by
Akshay Joshi
parent
065bda37b4
commit
0c8226ff39
@@ -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;
|
||||
Reference in New Issue
Block a user