Actions
Bug #3194
closedUgly errors when destroy actions are stopped by FKs
Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
Database
Target version:
-
Description
Server errors aren't very helpful when an FK prevents a destroy:
PG::ForeignKeyViolation: ERROR: update or delete on table "smart_proxies" violates foreign key constraint "subnets_dhcp_id_fk" on table "subnets" DETAIL: Key (id)=(1) is still referenced from table "subnets". : DELETE FROM "smart_proxies" WHERE "smart_proxies"."id" = $1 (145.2ms) ROLLBACK Completed 500 Internal Server Error in 3385ms
Updated by Dominic Cleal over 11 years ago
- Related to Feature #2400: Add foreign keys on database level added
Updated by Dominic Cleal about 11 years ago
And equally ugly in MySQL..
Mysql2::Error: Cannot delete or update a parent row: a foreign key constraint fails (`puppet`.`hostgroups`, CONSTRAINT `hostgroups_puppet_ca_proxy_id_fk` FOREIGN KEY (`puppet_ca_proxy_id`) REFERENCES `smart_proxies` (`id`)): DELETE FROM `smart_proxies` WHERE `smart_proxies`.`id` = 4
Updated by Dominic Cleal about 11 years ago
- Related to Bug #4033: Need a clearer / user friendly message when deletion of smart proxy fails added
Updated by Dominic Cleal almost 11 years ago
- Related to Bug #4415: FK error when deleting a smart proxy added
Updated by Dominic Cleal over 10 years ago
- Is duplicate of Bug #5788: before_destroy missing from EnsureNotUsedBy.new in SmartProxy model added
Updated by Dominic Cleal over 10 years ago
- Status changed from New to Duplicate
We had a helper whose job it was to provide friendly messages, but it wasn't invoked correctly. #5788 has fixed this.
Updated by Dominic Cleal over 10 years ago
- Bugzilla link set to https://bugzilla.redhat.com/show_bug.cgi?id=1109315
Updated by Dominic Cleal over 10 years ago
- Bugzilla link deleted (
https://bugzilla.redhat.com/show_bug.cgi?id=1109315)
Actions