Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NOISSUE - Removed unique constraint role_members_unique_entity_member_constraint on (member_id, entity_id). #2736

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions pkg/roles/repo/postgres/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,8 @@ func Migration(rolesTableNamePrefix, entityTableName, entityIDColumnName string)
member_id VARCHAR(254) NOT NULL,
entity_id VARCHAR(36) NOT NULL,
CONSTRAINT %s_role_members_unique_role_member_constraint UNIQUE (role_id, member_id),
CONSTRAINT %s_role_members_unique_entity_member_constraint UNIQUE (member_id, entity_id),
CONSTRAINT %s_role_members_fk_roles_id FOREIGN KEY(role_id) REFERENCES %s_roles(id) ON DELETE CASCADE
);`, rolesTableNamePrefix, rolesTableNamePrefix, rolesTableNamePrefix, rolesTableNamePrefix, rolesTableNamePrefix),
);`, rolesTableNamePrefix, rolesTableNamePrefix, rolesTableNamePrefix, rolesTableNamePrefix),
},
Down: []string{
fmt.Sprintf(`DROP TABLE IF EXISTS %s_roles`, rolesTableNamePrefix),
Expand Down
Loading