Sha256: e90b891ab6b4ceb28c0ae89b87d652f85698267897080c2e2fabb24dfabec7ef
Contents?: true
Size: 369 Bytes
Versions: 33
Compression:
Stored size: 369 Bytes
Contents
class BackfillStackIdOnStatuses < ActiveRecord::Migration[5.0] def up Shipit::Commit.order(stack_id: :asc).find_in_batches do |commits| commits.group_by(&:stack_id).each do |stack_id, stack_commits| Shipit::Status.where(commit_id: stack_commits.map(&:id)).update_all(stack_id: stack_id) end print '.' end end def down end end
Version data entries
33 entries across 33 versions & 1 rubygems