Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate/20171220191323_add_index_on_namespaces_lower_name.rb')
-rw-r--r--db/migrate/20171220191323_add_index_on_namespaces_lower_name.rb32
1 files changed, 0 insertions, 32 deletions
diff --git a/db/migrate/20171220191323_add_index_on_namespaces_lower_name.rb b/db/migrate/20171220191323_add_index_on_namespaces_lower_name.rb
deleted file mode 100644
index 7543e435941..00000000000
--- a/db/migrate/20171220191323_add_index_on_namespaces_lower_name.rb
+++ /dev/null
@@ -1,32 +0,0 @@
-class AddIndexOnNamespacesLowerName < ActiveRecord::Migration[4.2]
- include Gitlab::Database::MigrationHelpers
- DOWNTIME = false
- INDEX_NAME = 'index_on_namespaces_lower_name'
-
- disable_ddl_transaction!
-
- def up
- return unless Gitlab::Database.postgresql?
-
- disable_statement_timeout do
- if Gitlab::Database.version.to_f >= 9.5
- # Allow us to hot-patch the index manually ahead of the migration
- execute "CREATE INDEX CONCURRENTLY IF NOT EXISTS #{INDEX_NAME} ON namespaces (lower(name));"
- else
- execute "CREATE INDEX CONCURRENTLY #{INDEX_NAME} ON namespaces (lower(name));"
- end
- end
- end
-
- def down
- return unless Gitlab::Database.postgresql?
-
- disable_statement_timeout do
- if Gitlab::Database.version.to_f >= 9.2
- execute "DROP INDEX CONCURRENTLY IF EXISTS #{INDEX_NAME};"
- else
- execute "DROP INDEX IF EXISTS #{INDEX_NAME};"
- end
- end
- end
-end