django-robots: Migrations are missing for 5.0
I got this message after upgrading to 5.0.
Your models in app(s): 'robots' have changes that are not yet reflected in a migration, and so won't be applied.
Run 'manage.py makemigrations' to make new migrations, and then re-run 'manage.py migrate' to apply them.
The migration is forgotten to include in the commit.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 4
- Comments: 22 (13 by maintainers)
Commits related to this issue
- Drop django-robots as release is missing migration Latest release is missing a migration file which is causing our makemigrations check to fail. https://github.com/jazzband/django-robots/issues/124 — committed to DemocracyClub/WhoCanIVoteFor by michaeljcollinsuk 2 years ago
- Drop django-robots as release is missing migration Latest release is missing a migration file which is causing our makemigrations check to fail. https://github.com/jazzband/django-robots/issues/124 — committed to DemocracyClub/WhoCanIVoteFor by michaeljcollinsuk 2 years ago
- Set default auto field to BigAutoField (#134) In re: #124 missing migration This may, in turn, create migrations for those who manually created them. Each situation depends on the system — committed to jazzband/django-robots by jan-szejko-steelseries 2 years ago
- Set default auto field to BigAutoField (#134) In re: #124 missing migration This may, in turn, create migrations for those who manually created them. Each situation depends on the system — committed to jazzband/django-robots by jan-szejko-steelseries 2 years ago
- Release v6.0 See also: https://github.com/jazzband/django-robots/issues/124#issuecomment-1699231271 — committed to jazzband/django-robots by tony 10 months ago
Hey hey đź‘‹ I have got a production Django 3.2 app which still sets its own
DEFAULT_AUTO_FIELDtodjango.db.models.AutoField.A while back when trying to move from
django-robots==4.0todjango-robots==5.0I did encounter the “missing migrations” problem described in this thread (so I just remained on4.0.)A few days ago I successfully transitioned the app from using
django-robots==4.0to instead use thatdjango-robots==6.0b0release – I have not encountered any problems with that move.cc @tony @jan-szejko-steelseries thanks!
@fdemmer Thank you for the feedback!
I am deliberating whether to release 6.0 now as its been a few months, we may not be able to count on more reviewers.
Any more reviewers available to try 6.0b? (PyPI, GitHub release, changes)
Hey @tony, thank you for the beta release! Just wanted to confirm, that it solves the “missing” migrations issue and I see no adverse effects.
@jonprindiville Thank you for getting back!
I will publish
django-robots==6.0this weekend, then@jan-szejko-steelseries Sorry for the delay - I’m not available during the weekdays (I will give this my undivided attention on Saturday)
@tony
I think this is related: https://docs.djangoproject.com/en/4.1/releases/3.2/#customizing-type-of-auto-created-primary-keys
The 0002 migration changed the auto fields to
BigAutoField, but it’s not set as the default for the app. So it works only for projects withDEFAULT_AUTO_FIELDset toBigAutoField.You can set the default in
src/robots/apps.py:so it works for everyone.