Commit 7b7416d9 authored by Robert Speicher's avatar Robert Speicher
Browse files

Merge branch...

Merge branch 'ce-11099-removing-the-project-that-holds-the-insights-configuration-raises-an-error' into 'master'

Add remove_foreign_key_if_exists

See merge request gitlab-org/gitlab-ce!28172
parents aa83a823 24eff5e0
...@@ -905,6 +905,12 @@ def replace_sql(column, pattern, replacement) ...@@ -905,6 +905,12 @@ def replace_sql(column, pattern, replacement)
end end
end end
def remove_foreign_key_if_exists(*args)
if foreign_key_exists?(*args)
def remove_foreign_key_without_error(*args) def remove_foreign_key_without_error(*args)
remove_foreign_key(*args) remove_foreign_key(*args)
rescue ArgumentError rescue ArgumentError
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