We’re having issues upgrading from Sentry 9.1.2 to 21.6.3
It fails creating the table auth_user, because it already exists.
It seems like Sentry/Django has lost track of which migrations to run.
This is also kind of a special setup (of course).
As we need to do test the upgrade without too much disruption we’ve cloned the database and sentry-data to a new VM, where we’re testing the upgrade.
Timeline:
Make database dump (pg 9.6), import dump to new db (pg 13) - Everything looks fine, no errors
Clone config and sentry-data to new VM
run ./install.sh (9.1.2) - log in to web interface, verify everything looks ok. No errors in logs
clone 21.6.3, update config, run ./install.sh (log below)
I’ve also attached the tables django_migrations and south_migrationhistory (as I’ve seen these were mentioned in other issues)
Too much log for the body of this post, see attached gist for logs:
One more piece of information i forgot to mention, we are using a GCP postgres instance - not the docker container (it’s removed from the compose file). This has worked very well for us in 9.1.2.
Our upgrade docs look like they are missing a step. Could you try upgrading to 21.5.0 before going to 21.6.3?
21.6.3 no longer has the south to django migration code. Going to 21.5.0 first will let you get off of south migrations and onto django migrations. 21.6.3 is important to stop at as that release will get you past the last migration that was squashed in 21.7.0