/db/migrate/20170623080805_remove_ci_variables_project_id_index.rb
https://gitlab.com/visay/gitlab-ce · Ruby · 19 lines · 15 code · 4 blank · 0 comment · 1 complexity · ef2aa947a31f3ed2b69759886a42032a MD5 · raw file
- class RemoveCiVariablesProjectIdIndex < ActiveRecord::Migration
- include Gitlab::Database::MigrationHelpers
- DOWNTIME = false
- disable_ddl_transaction!
- def up
- if index_exists?(:ci_variables, :project_id)
- remove_concurrent_index(:ci_variables, :project_id)
- end
- end
- def down
- unless index_exists?(:ci_variables, :project_id)
- add_concurrent_index(:ci_variables, :project_id)
- end
- end
- end