4👍
I’ve not tested this but I’d imagine you’d be able to squash your migrations together which will consolidate them.
manage.py squashmigrations myapp 0050
You need to pass this the name of your app you want to squash, as well as the number of the migration that you want to squash up to.
What this does is merge together your migration files in to one "super" migration file that will contain all the changes in those migrations, whilst removing those changes that conflict.
Squashing is the act of reducing an existing set of many migrations down to one (or sometimes a few) migrations which still represent the same changes.
Django does this by taking all of your existing migrations, extracting their Operations and putting them all in sequence, and then running an optimizer over them to try and reduce the length of the list – for example, it knows that CreateModel and DeleteModel cancel each other out, and it knows that AddField can be rolled into CreateModel.
1👍
Since the Field type is only on the Software level, you can make as follow (kind of Trick): just change the third_party_package.SpecificImageField(...)
with models.ImageField(...)
in your migrations script. It will work perfectly since it will change nothing at the database level, otherwise you will have to optimize your migrations scripts manually till get off the dependency.