Welcome to mirror list, hosted at ThFree Co, Russian Federation.

20200513235347_fill_store_uploads.rb « migrate « db - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 42db5e4cc083677dc9a0b2f087e18512e1492765 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# 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