[issue #590] Attempt to speed up migration.

This commit is contained in:
George Vinogradov 2012-08-04 00:15:25 +04:00
parent bf251e01c0
commit d407433f45
1 changed files with 1 additions and 1 deletions

View File

@ -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