Skip to content
Snippets Groups Projects
Commit b66f4898 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Better message for migrating global projects

parent 65cba5c6
No related branches found
No related tags found
No related merge requests found
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
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment