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 can help you have a more smooth upgrade.
### Find projets with invalid project names
#### MySQL
Login to MySQL:
mysql -u root -p
Find projects with invalid names:
```bash
mysql> use gitlabhq_production;
# find projects with invalid first char, projects must start with letter
mysql> select name from projects where name REGEXP '^[^A-Za-z]';
# find projects with other invalid chars
## names must only contain alphanumeric chars, underscores, spaces, periods, and dashes
mysql> select name from projects where name REGEXP '[^a-zA-Z0-9_ .-]+';
```
If any projects have invalid names try correcting them from the web interface before starting the upgrade.
If correcting them from the web interface fails you can correct them using MySQL:
```bash
# e.g. replace invalid / with allowed _
mysql> update projects set name = REPLACE(name,'/','_');
# repeat for all invalid chars found in project names
```
#### PostgreSQL
Make sure all project names start with a letter and only contain alphanumeric chars, underscores, spaces, periods, and dashes (a-zA-Z0-9_ .-).
### Find other common errors
```
cd /home/git/gitlab
# Start rails console
sudo -u git -H bin/rails console production
# Make sure none of the following rails commands return results
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.