diff options
Diffstat (limited to 'db/migrate/20170317203554_index_routes_path_for_like.rb')
-rw-r--r-- | db/migrate/20170317203554_index_routes_path_for_like.rb | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/db/migrate/20170317203554_index_routes_path_for_like.rb b/db/migrate/20170317203554_index_routes_path_for_like.rb deleted file mode 100644 index a1bee3c8783..00000000000 --- a/db/migrate/20170317203554_index_routes_path_for_like.rb +++ /dev/null @@ -1,28 +0,0 @@ -# See http://doc.gitlab.com/ce/development/migration_style_guide.html -# for more information on how to write migrations for GitLab. - -class IndexRoutesPathForLike < ActiveRecord::Migration[4.2] - include Gitlab::Database::MigrationHelpers - - # Set this constant to true if this migration requires downtime. - DOWNTIME = false - - INDEX_NAME = 'index_routes_on_path_text_pattern_ops' - - disable_ddl_transaction! - - def up - return unless Gitlab::Database.postgresql? - - unless index_exists?(:routes, :path, name: INDEX_NAME) - execute("CREATE INDEX CONCURRENTLY #{INDEX_NAME} ON routes (path varchar_pattern_ops);") - end - end - - def down - return unless Gitlab::Database.postgresql? - return unless index_exists?(:routes, :path, name: INDEX_NAME) - - remove_concurrent_index_by_name(:routes, INDEX_NAME) - end -end |