Commit cf341333 authored by Robert Speicher's avatar Robert Speicher

Merge branch '764-dont-add-fingerprint-index-if-exists' into 'master'

Avoid adding index if already exists

Closes #764

See merge request !539
parents 07cd7f4b 6813f0cf
......@@ -2,6 +2,7 @@ Please view this file on the master branch, on stable branches it's out of date.
v 8.10.0 (unreleased)
- Rename Git Hooks to Push Rules
- Fix EE keys fingerprint add index migration if came from CE
v 8.9.5
- Fix of quoted text in lock tooltip. !518
......
......@@ -2,6 +2,7 @@
class AddFingerprintIndex < ActiveRecord::Migration
disable_ddl_transaction!
# https://gitlab.com/gitlab-org/gitlab-ee/issues/764
def change
args = [:keys, :fingerprint]
......@@ -9,6 +10,6 @@ class AddFingerprintIndex < ActiveRecord::Migration
args << { algorithm: :concurrently }
end
add_index(*args)
add_index(*args) unless index_exists?(:keys, :fingerprint)
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