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/post_migrate/20220909114220_drop_environments_project_name_lower_pattern_ops_index.rb')
-rw-r--r--db/post_migrate/20220909114220_drop_environments_project_name_lower_pattern_ops_index.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/db/post_migrate/20220909114220_drop_environments_project_name_lower_pattern_ops_index.rb b/db/post_migrate/20220909114220_drop_environments_project_name_lower_pattern_ops_index.rb
new file mode 100644
index 00000000000..3ab71809039
--- /dev/null
+++ b/db/post_migrate/20220909114220_drop_environments_project_name_lower_pattern_ops_index.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+# reverts db/migrate/20220901131828_add_environments_project_name_lower_pattern_ops_index.rb
+class DropEnvironmentsProjectNameLowerPatternOpsIndex < Gitlab::Database::Migration[2.0]
+ disable_ddl_transaction!
+
+ INDEX_NAME = 'index_environments_on_project_name_varchar_pattern_ops'
+
+ def up
+ remove_concurrent_index_by_name :environments, INDEX_NAME
+ end
+
+ def down
+ add_concurrent_index :environments, 'project_id, lower(name) varchar_pattern_ops', name: INDEX_NAME
+ end
+end