You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
python manage.py makemigrations is generating a 0003_alter_apikey_id.py file for drf_simple_apikey app.
This looks wrong as the migrations files should already be up to date in the app.
To Reproduce
Not sure if this is related to django version or anything else.
Using Django 4.2.11, run python manage.py makemigrations.
A third migration step has been generated and will be applied.
Expected behavior
No migration step should be generated
Desktop (please complete the following information):
OS: docker image python:3.11-alpine
Version: 2.1.0
Python Version: 3.11
Django Version: 4.2.11
The text was updated successfully, but these errors were encountered:
After investigation, the error is due to the DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' in your settings.py file. When I started the project, I didn't make this change, so id fields were generated using the models.AutoField.
A way to resolve this will be on my side to modify the 0001_initial.py file, but that will be dangerous for people who might be upgrading the versions, as it might cause some migrations issues. The safest way might be to add this migration to the package officially; I don't see what it can create badly.
Describe the bug
python manage.py makemigrations is generating a 0003_alter_apikey_id.py file for drf_simple_apikey app.
This looks wrong as the migrations files should already be up to date in the app.
To Reproduce
Not sure if this is related to django version or anything else.
Using Django 4.2.11, run
python manage.py makemigrations
.A third migration step has been generated and will be applied.
Expected behavior
No migration step should be generated
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: