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/20200914184212_remove_index_on_security_findings_scan_id.rb')
-rw-r--r--db/migrate/20200914184212_remove_index_on_security_findings_scan_id.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/db/migrate/20200914184212_remove_index_on_security_findings_scan_id.rb b/db/migrate/20200914184212_remove_index_on_security_findings_scan_id.rb
new file mode 100644
index 00000000000..342dba537d5
--- /dev/null
+++ b/db/migrate/20200914184212_remove_index_on_security_findings_scan_id.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+class RemoveIndexOnSecurityFindingsScanId < ActiveRecord::Migration[6.0]
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+ INDEX_NAME = 'index_security_findings_on_scan_id'
+
+ disable_ddl_transaction!
+
+ def up
+ remove_concurrent_index_by_name :security_findings, INDEX_NAME
+ end
+
+ def down
+ add_concurrent_index :security_findings, :scan_id, name: INDEX_NAME
+ end
+end