diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-08-20 12:40:51 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-08-20 12:40:51 +0300 |
commit | b66f4898ea14bdfe271465fbcc9b133ae0bee4f1 (patch) | |
tree | ef2d63dd883ce14052eaf6d01e4c0fa8462dcc37 | |
parent | 65cba5c6b91483f7f629c9bb2dcd98e2da92405c (diff) | |
download | gitlab-ce-b66f4898ea14bdfe271465fbcc9b133ae0bee4f1.tar.gz |
Better message for migrating global projects
-rw-r--r-- | lib/tasks/migrate/migrate_global_projects.rake | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/tasks/migrate/migrate_global_projects.rake b/lib/tasks/migrate/migrate_global_projects.rake index 2cf9c23fb80..7a61bc82d20 100644 --- a/lib/tasks/migrate/migrate_global_projects.rake +++ b/lib/tasks/migrate/migrate_global_projects.rake @@ -1,7 +1,14 @@ 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 + found = Project.where(namespace_id: nil).count + if found > 0 + puts "Global namespace is deprecated. We found #{found} projects stored in global namespace".yellow + puts "You may abort this task and move them to group/user namespaces manually." + puts "If you want us to move this projects under owner namespaces then continue" + ask_to_continue + else + puts "No global projects found. Proceed with update.".green + end Project.where(namespace_id: nil).find_each(batch_size: 20) do |project| begin |