summaryrefslogtreecommitdiff
path: root/lib/tasks/migrate
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-06-19 18:32:08 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-06-19 18:32:08 +0300
commitcf8b465cb96f5aa6e53fec60c0d6e62ad1ccbc5e (patch)
treed714e0bae682113f15cc5092ae7c7e45b39581c0 /lib/tasks/migrate
parent6e35aceff29ddeae6282de31e81e48446ab927fa (diff)
downloadgitlab-ce-cf8b465cb96f5aa6e53fec60c0d6e62ad1ccbc5e.tar.gz
Remove Global namespace from options. Prepared file for migration of global projects
Diffstat (limited to 'lib/tasks/migrate')
-rw-r--r--lib/tasks/migrate/migrate_global_projects.rake12
1 files changed, 12 insertions, 0 deletions
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
+