Commit 6813f0cf authored by Paco Guzman's avatar Paco Guzman

Avoid adding index if already exists

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