Commit 534148e9 authored by Robert Speicher's avatar Robert Speicher Committed by Robert Speicher

Merge branch 'issue_12658' into 'master'

Check if index exists before adding it

I got an error when updating GDK because it already exists.

[ci skip]

See merge request !3335
parent c8cc1c16
class IndexNamespacesOnVisibilityLevel < ActiveRecord::Migration
def change
add_index :namespaces, :visibility_level
unless index_exists?(:namespaces, :visibility_level)
add_index :namespaces, :visibility_level
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