diff options
Diffstat (limited to 'db/migrate/20200513235347_fill_store_uploads.rb')
-rw-r--r-- | db/migrate/20200513235347_fill_store_uploads.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/db/migrate/20200513235347_fill_store_uploads.rb b/db/migrate/20200513235347_fill_store_uploads.rb new file mode 100644 index 00000000000..42db5e4cc08 --- /dev/null +++ b/db/migrate/20200513235347_fill_store_uploads.rb @@ -0,0 +1,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 |