Error when updating role id #210

Closed
opened 2019-05-10 04:05:43 +00:00 by korina.cordero · 6 comments
korina.cordero commented 2019-05-10 04:05:43 +00:00 (Migrated from gitlab.com)

An exception occurred while executing 'UPDATE role SET id = ? WHERE id = ?' with params ["TEST_ROLEdfdfdf", "TEST_ROLE"]:
ForeignKeyConstraintViolationException
SQLSTATE[23000]: Integrity constraint violation: 1451 Cannot delete or update a parent row: a foreign key constraint fails (db_name.user_role, CONSTRAINT FK_2DE8C6A3D60322AC FOREIGN KEY (role_id) REFERENCES role (id) ON DELETE CASCADE)

As discussed, catch the exception and return an error to be displayed.

An exception occurred while executing 'UPDATE role SET id = ? WHERE id = ?' with params ["TEST_ROLEdfdfdf", "TEST_ROLE"]: ForeignKeyConstraintViolationException SQLSTATE[23000]: Integrity constraint violation: 1451 Cannot delete or update a parent row: a foreign key constraint fails (db_name.user_role, CONSTRAINT FK_2DE8C6A3D60322AC FOREIGN KEY (role_id) REFERENCES role (id) ON DELETE CASCADE) As discussed, catch the exception and return an error to be displayed.
korina.cordero commented 2019-05-10 04:05:51 +00:00 (Migrated from gitlab.com)

created merge request !246 to address this issue

created merge request !246 to address this issue
korina.cordero commented 2019-05-10 04:05:51 +00:00 (Migrated from gitlab.com)

mentioned in merge request !246

mentioned in merge request !246
korina.cordero commented 2019-05-10 07:02:55 +00:00 (Migrated from gitlab.com)

mentioned in commit 0d291b037c

mentioned in commit 0d291b037c0b59b0547b5f04821426f30dd29302
korina.cordero commented 2019-05-10 07:09:57 +00:00 (Migrated from gitlab.com)

mentioned in commit b8a7cf6e2a

mentioned in commit b8a7cf6e2a51d0f9e2f97c20c87a15569b483578
jankstudio commented 2019-05-27 02:01:57 +00:00 (Migrated from gitlab.com)

closed via merge request !246

closed via merge request !246
jankstudio commented 2019-05-27 02:01:57 +00:00 (Migrated from gitlab.com)

mentioned in commit 74f292da52

mentioned in commit 74f292da525f78b695d1881f5ab25af78eccd82d
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: rgutierrez/resq#210
No description provided.