Project

General

Profile

Actions

Bug #7998

closed

Bad foreign key on docker_tags image relationship causes destroy to fail

Added by Daniel Lobato Garcia over 10 years ago. Updated over 6 years ago.

Status:
Rejected
Priority:
Normal
Category:
-
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Trying to call tag.destroy fails with the following error:

ActiveRecord::StatementInvalid: Mysql2::Error: Cannot delete or update a parent row: a foreign key constraint fails (`foreman`.`containers`, CONSTRAINT `containers_docker_tag_id_fk` FOREIGN KEY (`docker_tag_id`) REFERENCES `docker_tags` (`id`)): DELETE FROM `docker_tags` WHERE `docker_tags`.`id` = 6

Actions

Also available in: Atom PDF