-
-
Notifications
You must be signed in to change notification settings - Fork 793
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
3.0.0 access token migration does not work #1490
Comments
seems to be related to #1489, but we are not using custom models in DOT. |
Yeah I believe the problem is the migration needs to have explicit code added to generate and set the checksum for existing tokens. Easy to see how this snuck through testing as an empty database won't have any old tokens in it. |
A workaround might be to delete existing access tokens before migrating -- which is not ideal if you are trying to upgrade a live system. |
I'm currently working on a fix for the migration. Given the use of pre_save hooks and the like, the model may need to retain the unique and blank values. We can iterate on that once the fix proves out.... |
@gardenerik #1491 is not fully tested but I wanted to get it out there so you could try it. I will try to reproduce it myself as well but am running up against a time deadline for other work at the moment. |
That looks like it would resolve the problem, I can try to run it against a copy of our production tomorrow if needed. |
Hang on a sec. I need to split the migration into two parts since the index constraint can't happen until after the checksums are added for the old tokens. |
OK to try it now. I still think there's some work needed to make the model consistent with the result of the migration. |
I have the same issue, rolling back until resolved. |
3.0.1 released |
@gardenerik @JasonLovesDoggo please let me know for sure that this is working for you now. Thanks. |
Worked fine for me, I can't 100% remember if I updated prod yet but it passed local tests just fine |
I can also confirm that 3.0.1 works on a copy of our production data. |
Describe the bug
The AccessToken has a new checksum field, that is both
unique
andblank
, which means that existing tokens will be assigned empty checksum by default. However, empty string is not unique.To Reproduce
Run migrate on an existing database.
Expected behavior
The migration should run successfully.
Version
3.0.0
Additional context
The text was updated successfully, but these errors were encountered: