Hello,
In one of my project the initial migration (0001) contains the index_together clause. The model as been modified in the 0002 migration and the index has been deleted. So the index_together makes no sens anymore even for new project installations (basically it’ an index creation in the 0001 and an index deletion in 0002).
The problem is that during the UnitTest each and every migrations files are executed, and since the index_together is no longer available in Django 5.1 an error is raised when applying the 0001 migration file.
My question is the following : is it okay/safe to edit the early migrations file (0001 and 0002) to remove the index_together clause ? Or maybe try to squash them ? (I don’t know how a create/delete of an index is handled during a squash)
Thanks for your tips and for your help.
Kind Regards.
Joel