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

Cannot delete a service with a run sheet #698

Closed
tbar0970 opened this issue Feb 15, 2021 · 1 comment
Closed

Cannot delete a service with a run sheet #698

tbar0970 opened this issue Feb 15, 2021 · 1 comment

Comments

@tbar0970
Copy link
Owner

SQLSTATE[23000]: Integrity constraint violation: 1451 Cannot delete or update a parent row: a foreign key constraint fails (`je_cciw`.`service_item`, CONSTRAINT `service_item_serviceid` FOREIGN KEY (`serviceid`) REFERENCES `service` (`id`))
Line 440 of /home/jethro/code/2.30.0/include/db_object.class.php

REQUEST:
Array
(
    [view] => services__list_all
...
    [editing] => Edit Schedule
    [program_submitted] => 1
    [delete_single] => 3650
    [delete_all_date] =>
@tbar0970
Copy link
Owner Author

Actually on most systems you can - this particular system had extra foreign keys somehow.
But there was a FK missing which I have added, with delete cascade for serviceid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant