diff --git a/db/post_migrate/20170502101023_cleanup_namespaceless_pending_delete_projects.rb b/db/post_migrate/20170502101023_cleanup_namespaceless_pending_delete_projects.rb index 2d242da9ef8..ce52de91cdd 100644 --- a/db/post_migrate/20170502101023_cleanup_namespaceless_pending_delete_projects.rb +++ b/db/post_migrate/20170502101023_cleanup_namespaceless_pending_delete_projects.rb @@ -30,7 +30,7 @@ class CleanupNamespacelessPendingDeleteProjects < ActiveRecord::Migration private def pending_delete_batch - connection.exec_query(find_batch).map{ |row| row['id'] } + connection.exec_query(find_batch).map{ |row| row['id'].to_i } end BATCH_SIZE = 5000 diff --git a/spec/migrations/cleanup_namespaceless_pending_delete_projects_spec.rb b/spec/migrations/cleanup_namespaceless_pending_delete_projects_spec.rb index 0b8af5010ba..49e750a3f4d 100644 --- a/spec/migrations/cleanup_namespaceless_pending_delete_projects_spec.rb +++ b/spec/migrations/cleanup_namespaceless_pending_delete_projects_spec.rb @@ -15,7 +15,7 @@ describe CleanupNamespacelessPendingDeleteProjects do project = build(:empty_project, pending_delete: true, namespace_id: nil) project.save(validate: false) - expect(NamespacelessProjectDestroyWorker).to receive(:bulk_perform_async).with([[project.id.to_s]]) + expect(NamespacelessProjectDestroyWorker).to receive(:bulk_perform_async).with([[project.id]]) described_class.new.up end