Commit 8507a7cd authored by Mehmet Emin INAC's avatar Mehmet Emin INAC

Remove the extra check of table exists

parent 56b7dfb0
......@@ -11,7 +11,7 @@ class SchedulePopulateResolvedOnDefaultBranchColumn < ActiveRecord::Migration[6.
disable_ddl_transaction!
def up
return unless run_migration?
return unless Gitlab.ee?
EE::Gitlab::BackgroundMigration::PopulateResolvedOnDefaultBranchColumn::Vulnerability.distinct.each_batch(of: BATCH_SIZE, column: :project_id) do |batch, index|
project_ids = batch.pluck(:project_id)
......@@ -25,10 +25,4 @@ class SchedulePopulateResolvedOnDefaultBranchColumn < ActiveRecord::Migration[6.
# `resolved_on_default_branch` column of `vulnerabilities`
# table so there is no rollback operation needed for this.
end
private
def run_migration?
Gitlab.ee? && table_exists?(:projects) && table_exists?(:vulnerabilities)
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment