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/20210119122354_alter_vsa_issue_first_mentioned_in_commit_value.rb')
-rw-r--r--db/post_migrate/20210119122354_alter_vsa_issue_first_mentioned_in_commit_value.rb34
1 files changed, 0 insertions, 34 deletions
diff --git a/db/post_migrate/20210119122354_alter_vsa_issue_first_mentioned_in_commit_value.rb b/db/post_migrate/20210119122354_alter_vsa_issue_first_mentioned_in_commit_value.rb
deleted file mode 100644
index 132d72e180b..00000000000
--- a/db/post_migrate/20210119122354_alter_vsa_issue_first_mentioned_in_commit_value.rb
+++ /dev/null
@@ -1,34 +0,0 @@
-# frozen_string_literal: true
-
-class AlterVsaIssueFirstMentionedInCommitValue < ActiveRecord::Migration[6.0]
- include Gitlab::Database::MigrationHelpers
-
- DOWNTIME = false
-
- disable_ddl_transaction!
-
- ISSUE_FIRST_MENTIONED_IN_COMMIT_FOSS = 2
- ISSUE_FIRST_MENTIONED_IN_COMMIT_EE = 6
-
- class GroupStage < ActiveRecord::Base
- self.table_name = 'analytics_cycle_analytics_group_stages'
-
- include EachBatch
- end
-
- def up
- GroupStage.each_batch(of: 100) do |relation|
- relation
- .where(start_event_identifier: ISSUE_FIRST_MENTIONED_IN_COMMIT_EE)
- .update_all(start_event_identifier: ISSUE_FIRST_MENTIONED_IN_COMMIT_FOSS)
-
- relation
- .where(end_event_identifier: ISSUE_FIRST_MENTIONED_IN_COMMIT_EE)
- .update_all(end_event_identifier: ISSUE_FIRST_MENTIONED_IN_COMMIT_FOSS)
- end
- end
-
- def down
- # rollback is not needed, the identifier "6" is the same as identifier "2" on the application level
- end
-end