-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Failing Migration: Drop (project, key, value) index on EventTag #6661
Comments
Hmmm. Weird. I’m not sure how that would have happened. Is your install really old by any chance? The easiest fix would be to just rename the current index. ALTER INDEX sentry_eventtag_project_id_42979ba214ba3c43 RENAME TO sentry_eventtag_project_id_183f8a8ce88d19cb; Should be sufficient to get it moving along so it can continue. |
Thanks for the quick response, @mattrobenolt. I did what you suggested, but after running the migration again it tries to find the Index under a different name... every time I am running this migration it will change the hash in the name again:
For me as a Python/Django/South dummy it looks as if its created on runtime due to this command:
|
Umm, that should be computed deterministically.
So I have no idea why this would be problematic for you or why this behavior is different. I could suggest a fix to get past this, but I can only assume you're going to hit this problem again in the future. This is how lots of things are managed, and if somehow you have the wrong names being generated... any mutation depending on the auto generated names won't work. They need to be deterministic for most things to work. If you open up |
Thanks again. I opened the sentry shell and did what you said. Yes I am seeing a deterministic behaviour as long as I am in the same shell session. After closing the shell and starting again I get a new hash:
And then...
Deploying this to heroku means I get a new hash on every deployment. |
What's really odd is that the index you have in your database was named correctly and matches with what I'm generating locally. I'll dig into the South code to see how this is generated now because I'm curious. But there's definitely something wrong with what you're doing, I just don't know what. |
Interesting, in your shell you got the hash I mentioned in the beginning that I had in the database before I renamed it. |
Maybe important to know about my setup: I am moving a sentry installation ( |
I was just updating sentry from
v8.20.0
to currentmaster
. I am deploying to heroku.Migrations from 0352 on were starting to run. When it came to 0365 it raised following error:
I checked the database and the index
sentry_eventtag_project_id_183f8a8ce88d19cb
indeed does not exist, but instead its calledsentry_eventtag_project_id_42979ba214ba3c43
and is for exactly the same columns (project_id, key_id, value_id).I don't know how migrations in django work, so I don't really know how to debug further without getting into django more.
Is this an issue with the migration itself or how can I fix the issue for me?
Thanks for any help!
The text was updated successfully, but these errors were encountered: