diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-04-05 20:44:16 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-04-05 20:44:16 +0300 |
commit | 0da5a4fab136158f9a51de1f92f74ebd9ea922a2 (patch) | |
tree | a646d1ee18e8e747dd22c3e25084ba1a776cbe16 /lib/tasks | |
parent | 10902c844fe834399e9b909b75ab3ea502c64a89 (diff) | |
download | gitlab-ce-0da5a4fab136158f9a51de1f92f74ebd9ea922a2.tar.gz |
separate rake task for migration and persistent one
Diffstat (limited to 'lib/tasks')
-rw-r--r-- | lib/tasks/migrate/migrate_mr.rake | 11 | ||||
-rw-r--r-- | lib/tasks/migrate/migrate_wiki.rake (renamed from lib/tasks/gitlab/migrate_wiki.rake) | 0 |
2 files changed, 11 insertions, 0 deletions
diff --git a/lib/tasks/migrate/migrate_mr.rake b/lib/tasks/migrate/migrate_mr.rake new file mode 100644 index 00000000000..6c2312b053c --- /dev/null +++ b/lib/tasks/migrate/migrate_mr.rake @@ -0,0 +1,11 @@ +# This taks will reload commits/diff for all merge requests +desc "GITLAB | Migrate Merge Requests" +task migrate_merge_requests: :environment do + MergeRequest.find_each(batch_size: 20) do |mr| + mr.st_commits = [] + mr.save + mr.reload_code + print '.' + end +end + diff --git a/lib/tasks/gitlab/migrate_wiki.rake b/lib/tasks/migrate/migrate_wiki.rake index 5d9881e45db..5d9881e45db 100644 --- a/lib/tasks/gitlab/migrate_wiki.rake +++ b/lib/tasks/migrate/migrate_wiki.rake |