-
Notifications
You must be signed in to change notification settings - Fork 671
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
Merge token_blacklist migrations into one (#615) #781
base: master
Are you sure you want to change the base?
Conversation
afoalb
commented
Feb 8, 2024
•
edited
Loading
edited
- Initial migrations defined id as AutoField, later migrations changed the type to BigAutoField. This conversion is not allowed in MSSQL.
- Initial migrations defined id as AutoField, later migrations changed the type to BigAutoField. This conversion is not allowed in MSSQL
for more information, see https://pre-commit.ci
I ran all tox tests locally and they all passed. Not clear why they are failling here on github |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By default, Postgres favors BigAutoField
. Talking about database-specific implementations:
AutoField as 32-bit INT
, and BigAutoField to its 64-bit BIGINT
character, in both MySQL and MariaDB.
Notably, AutoField
maps to INT (32-bit) or BIGINT (64-bit) depending on DEFAULT_AUTO_FIELD
setting or explicit field declaration - which by default is AutoField
in django unless otherwise specified.
That said, this is a good move, and should we get the tests up, would be merging this MR
On deeper considerations, let's review the backwards compatibility that might revolve around this change - potential impact on existing projects. Thoughts? |
Hi, any updaes? |
This would break backwards compatibility. Unlike SQLAlchemy which stores the last migrated revision id, Django migrations are managed by storing each migration name in the database (IIRC). This would still not be great for users who haven't upgraded simplejwt. If we're looking for MSSQL changes, consider checking whether the database type is MSSQL then run an MSSQL specific change. |