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

Most upvoted comments

Any more reviewers available to try 6.0b?

Hey hey đź‘‹ I have got a production Django 3.2 app which still sets its own DEFAULT_AUTO_FIELD to django.db.models.AutoField.

A while back when trying to move from django-robots==4.0 to django-robots==5.0 I did encounter the “missing migrations” problem described in this thread (so I just remained on 4.0.)

A few days ago I successfully transitioned the app from using django-robots==4.0 to instead use that django-robots==6.0b0 release – 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.0 this 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 with DEFAULT_AUTO_FIELD set to BigAutoField.

You can set the default in src/robots/apps.py:

from django.apps import AppConfig

class RobotsConfig(AppConfig):
    default_auto_field = 'django.db.models.BigAutoField'
    name = 'robots'

so it works for everyone.