Hello,
Michal is right, except…
If you have only one server running your code, there is no real need to keep your unsquashed migrations; do a squash, and remove everything else.
If, however, your app's source is public, imagine the following scenario:
You publish your app with 3 migration files. I install it and migrate. Then you create 2 more, but later decide to squash all 5 into one (resulting in a 0001_0005 migration file) and remove the old ones. Now I hear about the cool new feature you just built in and want to use it. I upgrade the app, run migrate… and Django will miss the 0004 and 0005 files.
If I create an empty migration with the same name of your 0004 (I can check it in the squashed migration file), then run makemigration, I'll get the same result as you (I have to rename 0005 again, of course). However, if you had a RunPython step in your 0004, I will know nothing about it, and may destroy my data (of course not, I have backups).
=====
I have some Django projects in production, and we always keep migration files. We also have most of them squashed just in case (it speeds up testing a lot).
I hope I helped :)
Best,
Gergely
> --
> You received this message because you are subscribed to the Google Groups "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
> To post to this group, send email to django...@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/20160513054234.GC435%40koniiiik.org.
> For more options, visit https://groups.google.com/d/optout.