Commit 100c62eb authored by Krasimir Angelov's avatar Krasimir Angelov

Remove unexpected FK fk_rails_e169a8e3d5 if exists

This is to fix a problem with dev.gitlab.org, see
https://gitlab.com/gitlab-com/gl-infra/production/-/issues/5531#note_676576081
parent 49c04fda
...@@ -98,6 +98,11 @@ class FinalizeCiBuildsBigintConversion < Gitlab::Database::Migration[1.0] ...@@ -98,6 +98,11 @@ class FinalizeCiBuildsBigintConversion < Gitlab::Database::Migration[1.0]
remove_foreign_key(:dep_ci_build_trace_sections, TABLE_NAME, column: :build_id) remove_foreign_key(:dep_ci_build_trace_sections, TABLE_NAME, column: :build_id)
end end
# Remove this unexpected FK if it exists - https://gitlab.com/gitlab-com/gl-infra/production/-/issues/5531#note_676576081
if foreign_key_exists?(:ci_resources, TABLE_NAME, column: :build_id, name: 'fk_rails_e169a8e3d5')
remove_foreign_key(:ci_resources, TABLE_NAME, column: :build_id, name: 'fk_rails_e169a8e3d5')
end
swap_columns swap_columns
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment