Actions
Bug #35031
closed20211220185935_clean_duplicate_content_units db:migrate fails with child records
Difficulty:
Triaged:
Yes
Bugzilla link:
Pull request:
Description
During db:migrate the database patch 20211220185935_clean_duplicate_content_units.rb is applied, but fails with the following error in /var/log/foreman-installer/katello.log:
2022-06-07 08:48:45 [INFO ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/returns: PG::ForeignKeyViolation: ERROR: update or delete on table "katello_module_profiles" violates foreign key constraint "katello_mod_profile_rpm_mod_profile_id_fk" on table "katello_module_profile_rpms" 2022-06-07 08:48:45 [INFO ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/returns: DETAIL: Key (id)=(22) is still referenced from table "katello_module_profile_rpms".
More details here: https://community.theforeman.org/t/foreignkeyviolation-on-katello-module-profiles-during-db-migrate/28926
Actions