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/20201019130244_remove_license_compliance_temp_index.rb')
-rw-r--r--db/migrate/20201019130244_remove_license_compliance_temp_index.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/db/migrate/20201019130244_remove_license_compliance_temp_index.rb b/db/migrate/20201019130244_remove_license_compliance_temp_index.rb
new file mode 100644
index 00000000000..d0383d999ed
--- /dev/null
+++ b/db/migrate/20201019130244_remove_license_compliance_temp_index.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+class RemoveLicenseComplianceTempIndex < ActiveRecord::Migration[6.0]
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+ INDEX_NAME = 'index_ci_job_artifacts_on_license_compliance_file_types'
+
+ disable_ddl_transaction!
+
+ def up
+ remove_concurrent_index_by_name :ci_job_artifacts, name: INDEX_NAME
+ end
+
+ def down
+ add_concurrent_index :ci_job_artifacts, [:job_id, :file_type], where: 'file_type = 10 OR file_type = 101', name: INDEX_NAME
+ end
+end