-
Notifications
You must be signed in to change notification settings - Fork 73
Open
Milestone
Description
General description of the problem
Reform does not generate models for tables with UNIQUE constraint in body of CREATE TABLE
Code snippets to reproduce the problem
CREATE TABLE some_table
(
id SERIAL PRIMARY KEY NOT NULL,
special_field INTEGER NOT NULL,
UNIQUE (id, special_field)
);
>reform-db -db-driver=postgres -db-source="..." init
>reform-db: Expected single column primary key, got 2
The next code works:
CREATE TABLE some_table
(
id SERIAL PRIMARY KEY NOT NULL,
special_field INTEGER NOT NULL
);
CREATE UNIQUE INDEX pg_unique_some_table_id_special_field ON some_table (id, special_field);
Metadata
Metadata
Assignees
Labels
No labels