mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-09 12:46:07 +10:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user