Hello.
I just use creating schema from SQL DDL (PostgreSQL), and find the problem.
If I use create table if not exists, then name for tables will be - IF NOT EXISTS public.table0...
And references don't show (FK ...)
CREATE TABLE IF NOT EXISTS public.table0 (
id bigserial PRIMARY KEY,
deleted boolean NOT NULL DEFAULT FALSE,
full_name varchar
);
CREATE TABLE IF NOT EXISTS public.table1 (
id bigserial PRIMARY KEY,
deleted boolean NOT NULL DEFAULT FALSE,
table0_id bigint NOT NULL REFERENCES public.table0 (id)
);
Hello. I just use creating schema from SQL DDL (PostgreSQL), and find the problem. If I use create table if not exists, then name for tables will be - IF NOT EXISTS public.table0... And references don't show (FK ...) CREATE TABLE IF NOT EXISTS public.table0 ( id bigserial PRIMARY KEY, deleted boolean NOT NULL DEFAULT FALSE, full_name varchar ); CREATE TABLE IF NOT EXISTS public.table1 ( id bigserial PRIMARY KEY, deleted boolean NOT NULL DEFAULT FALSE, table0_id bigint NOT NULL REFERENCES public.table0 (id) );