diff --git a/db/migrate/20120727141521_add_save_to_repository_to_build_lists.rb b/db/migrate/20120727141521_add_save_to_repository_to_build_lists.rb index f71eb1d01..4b79c8db5 100644 --- a/db/migrate/20120727141521_add_save_to_repository_to_build_lists.rb +++ b/db/migrate/20120727141521_add_save_to_repository_to_build_lists.rb @@ -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