etianen / django-reversion

django-reversion is an extension to the Django web framework that provides version control for model instances.
https://django-reversion.readthedocs.io
BSD 3-Clause "New" or "Revised" License
3.04k stars 489 forks source link

GH actions: add check for missing migrations (and fix migrations) #961

Closed kevinmarsh closed 9 months ago

kevinmarsh commented 9 months ago

Closes #959 and adds a GH action check via Django's makemigrations --check to prevent it happening again (you can see the failing check here).

I also "fixed" the missing migration by just modifying the original migration instead of creating a new one (instead of #960) since this specific Model.Meta change doesn't affect the SQL schema this should be safe to do and thus doesn't require users to run new migrations in the next release.

There was also a missing migration in the test suite, I just created that since I didn't want to dig into that change too much and that migration wouldn't affect end users of this library.