dbml icon indicating copy to clipboard operation
dbml copied to clipboard

Error with composite foreign keys when importing from PostgreSQL

Open FergusFettes opened this issue 2 years ago • 0 comments

Duplicate of https://github.com/holistics/dbml/issues/142 but for Postgres.

Example Postgres Import:

create table table1 (
    field text not null,
    field2 text not null,
    primary key(field, field2)
);

create table if not exists table2 (
    id int generated always as identity primary key,
    field text,
    field2 text,
    foreign key (field, field2) references table1(field, field2)
);

using the web interface.

FergusFettes avatar Mar 30 '22 17:03 FergusFettes