You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current implementation (#73 and #79) allows for foreign key constraints to be added to an individual columns, referencing one column in the target table.
This should be extended to allow foreign key constraints to be defined at the table level so they can span multiple columns.
The text was updated successfully, but these errors were encountered:
Firstly, I would like to express my gratitude for your efforts in developing and maintaining this valuable tool. It's been instrumental in many of my projects, and I truly appreciate the work you've put into it.
I'm writing to inquire about the current support for composite keys and indexes in pgroll. Based on my experiances, not only foreign keys are not supported, but also
Composite Primary Keys
Composite Unique Keys
Composite Indexes
are not supported for now.
These features are crucial for the implementation of complex data models where single-column keys are insufficient to ensure data integrity and performance optimization.
Thank you for your feedback! This is indeed something we want to tackle soon, as it's an important limitation. Now that we have all the foundations in place it feels like we are ready to start working on this.
CREATE TABLE IF NOT EXISTS "users_to_groups" (
"id" serial PRIMARY KEY NOT NULL,
"user_id" integer NOT NULL,
"group_id" integer NOT NULL,
CONSTRAINT "users_to_groups_group_id_user_id_pk" PRIMARY KEY("group_id","user_id")
);
Error: unable to execute start operation: pq: multiple primary keys for table "users_to_groups" are not allowed
The current implementation (#73 and #79) allows for foreign key constraints to be added to an individual columns, referencing one column in the target table.
This should be extended to allow foreign key constraints to be defined at the table level so they can span multiple columns.
The text was updated successfully, but these errors were encountered: