Skip to content

Commit

Permalink
Merge pull request #1580 from cisagov/update-migrations-doc
Browse files Browse the repository at this point in the history
Update scenario 2 in migrations doc
  • Loading branch information
rachidatecs authored Jan 9, 2024
2 parents e2af9ac + 3c28cc3 commit dc41435
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions docs/developer/migration-troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ This happens when you swap branches on your sandbox that contain diverging leave
- `cf login -a api.fr.cloud.gov --sso`
- `cf ssh getgov-<app>`
- `/tmp/lifecycle/shell`
- `cf run-task getgov-<app> --wait --command 'python manage.py migrate registrar 39_previous_miration --fake' --name migrate`
- `cf run-task getgov-<app> --wait --command 'python manage.py migrate registrar 41_example_migration' --name migrate`
- `cf run-task getgov-<app> --wait --command 'python manage.py migrate registrar 45_last_migration --fake' --name migrate`

Then, navigate to and delete the offending migration. In this case, it is 0041_example_migration.
- Find the conflicting migrations: `./manage.py showmigrations`
- Delete one of them: `rm registrar/migrations/0041_example.py`
- `/manage.py showmigrations`
- `/manage.py makemigrations`
- `/manage.py migrate`

### Scenario 3: Migrations ran incorrectly, and migrate no longer works (sandbox)

Expand Down

0 comments on commit dc41435

Please sign in to comment.