[issue #590] Attempt to speed up migration.
This commit is contained in:
parent
bf251e01c0
commit
d407433f45
|
@ -2,7 +2,7 @@ class AddSaveToRepositoryToBuildLists < ActiveRecord::Migration
|
|||
def self.up
|
||||
add_column :build_lists, :save_to_repository_id, :integer
|
||||
|
||||
BuildList.scoped.find_in_batches do |batch|
|
||||
BuildList.scoped.includes(:project => :repositories, :save_to_platform => :repositories).find_in_batches do |batch|
|
||||
batch.each do |bl|
|
||||
begin
|
||||
project = bl.project
|
||||
|
|
Loading…
Reference in New Issue