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 2791c9a8c..99768ba40 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.includes(project: :repositories, save_to_platform: :repositories).find_in_batches do |batch| + BuildList.includes(project: :repositories, save_to_platform: :repositories).find_in_batches do |batch| batch.each do |bl| begin project = bl.project diff --git a/lib/tasks/hook.rake b/lib/tasks/hook.rake index 0cb214e79..847746a48 100644 --- a/lib/tasks/hook.rake +++ b/lib/tasks/hook.rake @@ -3,7 +3,7 @@ namespace :hook do task install: :environment do hook = "/home/#{APP_CONFIG['shell_user']}/gitlab-shell/hooks/post-receive" say "Install process.." - count, projects = 0, Project.scoped + count, projects = 0, Project.all projects = projects.where(id: ENV['PROJECT_ID']) if ENV['PROJECT_ID'] projects.each do |project| next unless Dir.exist? project.path @@ -24,7 +24,7 @@ namespace :hook do desc "remove git hook from all repos" task remove: :environment do say "process.." - count, projects = 0, Project.scoped + count, projects = 0, Project.all projects = projects.where(id: ENV['PROJECT_ID']) if ENV['PROJECT_ID'] projects.each do |project| FileUtils.rm_rf File.join(project.path, 'hooks', 'post-receive') diff --git a/lib/tasks/projects.rake b/lib/tasks/projects.rake index 5214007c4..22f80768b 100644 --- a/lib/tasks/projects.rake +++ b/lib/tasks/projects.rake @@ -3,7 +3,7 @@ namespace :project do namespace :maintainer do desc 'Set maintainer to owner (or to owners owner if owner is a group) to projects' task set_to_owner: :environment do - projects = Project.scoped + projects = Project.all count = projects.count say "Setting maintainer to all projects (#{count})" percent_per_batch = 100 * 1000 / count