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/20230901064536_add_concurrent_index_for_ci_pipeline_chat_data_pipeline_id_convert_to_bigint.rb')
-rw-r--r--db/post_migrate/20230901064536_add_concurrent_index_for_ci_pipeline_chat_data_pipeline_id_convert_to_bigint.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/db/post_migrate/20230901064536_add_concurrent_index_for_ci_pipeline_chat_data_pipeline_id_convert_to_bigint.rb b/db/post_migrate/20230901064536_add_concurrent_index_for_ci_pipeline_chat_data_pipeline_id_convert_to_bigint.rb
new file mode 100644
index 00000000000..35b5fca789b
--- /dev/null
+++ b/db/post_migrate/20230901064536_add_concurrent_index_for_ci_pipeline_chat_data_pipeline_id_convert_to_bigint.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+class AddConcurrentIndexForCiPipelineChatDataPipelineIdConvertToBigint < Gitlab::Database::Migration[2.1]
+ disable_ddl_transaction!
+
+ INDEX_NAME = "index_ci_pipeline_chat_data_on_pipeline_id_convert_to_bigint"
+ TABLE_NAME = :ci_pipeline_chat_data
+ COLUMN_NAME = :pipeline_id_convert_to_bigint
+
+ def up
+ add_concurrent_index TABLE_NAME, COLUMN_NAME, name: INDEX_NAME, unique: true
+ end
+
+ def down
+ remove_concurrent_index_by_name TABLE_NAME, name: INDEX_NAME
+ end
+end