Check if index exists before adding it. [ci skip]
* I got an error when updating GDK because it already exists.
This commit is contained in:
parent
3a78f7caa0
commit
cbdbbcbc4f
|
@ -1,5 +1,7 @@
|
|||
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
|
||||
|
|
Loading…
Reference in New Issue