debian-mirror-gitlab/db/migrate/20200513235347_fill_store_uploads.rb

20 lines
345 B
Ruby
Raw Normal View History

2020-05-24 23:13:21 +05:30
# frozen_string_literal: true
class FillStoreUploads < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def up
update_column_in_batches(:uploads, :store, 1) do |table, query|
query.where(table[:store].eq(nil))
end
end
def down
# no-op
end
end