gitlab-org--gitlab-foss/db/migrate/20160320204112_index_namespaces_on_visibility_level.rb
Rubén Dávila cbdbbcbc4f Check if index exists before adding it. [ci skip]
* I got an error when updating GDK because it already exists.
2016-03-21 21:17:23 -05:00

7 lines
200 B
Ruby

class IndexNamespacesOnVisibilityLevel < ActiveRecord::Migration
def change
unless index_exists?(:namespaces, :visibility_level)
add_index :namespaces, :visibility_level
end
end
end