Hello 👋
currently trying to import a postgres sql script created by a pg_dump to dbml and it seems to not take into account the unique/primary key constraint.
CREATE TABLE test (
id integer NOT NULL,
location character varying(255) NOT NULL
);
ALTER TABLE test ADD CONSTRAINT test_location_key UNIQUE (location);
ALTER TABLE test ADD CONSTRAINT test_pkey PRIMARY KEY (id);
Hi @nihauc12, currently, our PostgreSQL parser doesn't support altering tables to add unique/primary key constraints. We will let you know as soon as we implement it.
Hello 👋 currently trying to import a postgres sql script created by a pg_dump to dbml and it seems to not take into account the unique/primary key constraint.
version 2.5.0 of dbml/core
Minimal script to reproduce:
with test.sql being
And the result log being
No pk or unique key.