debian-mirror-gitlab/db/migrate/20201026200736_seed_merge_trains_enabled.rb

20 lines
403 B
Ruby
Raw Normal View History

2021-01-29 00:20:46 +05:30
# frozen_string_literal: true
class SeedMergeTrainsEnabled < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def up
update_column_in_batches(:project_ci_cd_settings, :merge_trains_enabled, true) do |table, query|
query.where(table[:merge_pipelines_enabled].eq(true))
end
end
def down
# no-op
end
end