Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tatuya Kamada
gitlab-ce
Commits
b66f4898
Commit
b66f4898
authored
Aug 20, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better message for migrating global projects
parent
65cba5c6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
lib/tasks/migrate/migrate_global_projects.rake
lib/tasks/migrate/migrate_global_projects.rake
+9
-2
No files found.
lib/tasks/migrate/migrate_global_projects.rake
View file @
b66f4898
desc
"GITLAB | Migrate Global Projects to Namespaces"
desc
"GITLAB | Migrate Global Projects to Namespaces"
task
migrate_global_projects: :environment
do
task
migrate_global_projects: :environment
do
puts
"This will move all projects without namespace to owner namespace"
found
=
Project
.
where
(
namespace_id:
nil
).
count
ask_to_continue
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
|
Project
.
where
(
namespace_id:
nil
).
find_each
(
batch_size:
20
)
do
|
project
|
begin
begin
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment