From cf8b465cb96f5aa6e53fec60c0d6e62ad1ccbc5e Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Wed, 19 Jun 2013 18:32:08 +0300 Subject: Remove Global namespace from options. Prepared file for migration of global projects --- lib/tasks/migrate/migrate_global_projects.rake | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 lib/tasks/migrate/migrate_global_projects.rake (limited to 'lib/tasks/migrate') diff --git a/lib/tasks/migrate/migrate_global_projects.rake b/lib/tasks/migrate/migrate_global_projects.rake new file mode 100644 index 00000000000..f2f74723c3b --- /dev/null +++ b/lib/tasks/migrate/migrate_global_projects.rake @@ -0,0 +1,12 @@ +desc "GITLAB | Migrate Global Projects to Namespaces" +task migrate_global_projects: :environment do + puts "This will move all projects without namespace to owner namespace" + ask_to_continue + + Project.where(namespace_id: nil).find_each(batch_size: 20) do |project| + + # TODO: transfer code here + print '.' + end +end + -- cgit v1.2.1