class IndexNamespacesOnVisibilityLevel < ActiveRecord::Migration
  def change
    add_index :namespaces, :visibility_level
  end
end

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

Check if index exists before adding it.
Check if index exists before adding it. [ci skip]

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