Commit 7c4db532 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch '6_0_update_troubleshooting' of /home/git/repositories/gitlab/gitlabhq

parents 4649c6e3 c69b2856
...@@ -111,3 +111,21 @@ To make sure you didn't miss anything run a more thorough check with: ...@@ -111,3 +111,21 @@ To make sure you didn't miss anything run a more thorough check with:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production
If all items are green, then congratulations upgrade complete! If all items are green, then congratulations upgrade complete!
### Troubleshooting
The migrations in this update are very sensitive to incomplete or inconsistent data. If you have a long-running GitLab installation and some of the previous upgrades did not work out 100% correct this may bite you now. The following commands can be run in the rails console to look for 'bad' data.
All project owners should have an owner
```
Project.all.select { |project| project.owner.blank? }
```
Every user should have a namespace
```
User.all.select { |u| u.namespace.blank? }
```
Projects in the global namespace should not conflict with projects in the owner namespace
```
Project.where(namespace_id: nil).select { |p| Project.where(path: p.path, namespace_id: p.owner.try(:namespace).try(:id)).present? }
```
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment