-
-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade to 7.1.1 fails #1386
Comments
Same for me. |
If you 'sentry upgrade' again do you hit the same issue? Also can you confirm database and version? |
Yes, rerunning sentry upgrade it hits the same issue. PostgreSQL 9.3.5 Btw I worked around it by commenting out the offending migration and running it manually on psql after the rest migrations ran. |
Same issue. Commenting out |
This should solve the problem (But this isn't the best solution!) if not db.dry_run:
try:
db.start_transaction()
self.fix_missing_teams(orm)
db.commit_transaction()
except Exception as e:
import traceback; traceback.print_exc()
raise more info in doc: http://south.readthedocs.org/en/latest/migrationstructure.html#transactions |
I've released 7.1.2 which includes the above changes |
I'm not convinced this is resolved for existing installations yet. I'm going to dig into the transaction stuff (per @meverone's example), but I need to get a reproducible local environment setup first. As a quick fix you can:
|
I just have installed 7.1.4 and the issue still exists. Running the quick fix solves the issue. |
@dcramer how do you alter the schemas?
I can take down sentry and run the required SQL but I can't find it. |
@camilonova what we did was dump the database schema => run a regexp on the file to change all (id|*_id) columns to BIGINT => load the database schema => replicate to new database So we did it with minimal downtime, but you could do the above and just instead of replicate have a "load the data" step. |
Thanks, will try it. |
"update sentry_project set team_id = (select id from sentry_team limit 1) where team_id is null;" fixed the problem for me, thanks! |
This error is still present with |
I also got this error- @meverone's fix worked. Perhaps this could be merged. |
I can confirm that @dcramer his sql query fixed it for me. After that I could upgrade without issues |
As a reference for future people, the following query should fix it:
|
If anyone sees this in 8 we'll re-open this, but I know we made some changes to improve various things. |
Did happen while migrating from 6 to 8. Fixed using |
I'm getting the following error when trying to upgrade to 7.1.1:
Answering 'yes' instead of no has no effect in the error.
The text was updated successfully, but these errors were encountered: