SQL flush statements are generated for through many to many tables set managed = False
|Reported by:||trevor||Owned by:||nobody|
|Component:||Database layer (models, ORM)||Version:||1.0|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
SQL flush statements (those output by ./manage.py sqlflush) correctly do not include statements truncating django models marked as managed = False, except for those which are used as the through model for many to many relations (ManyToManyField(through=...)).
I have attached a patch which fixes the issue by excluding through models marked managed = False when creating the list of tables and sequences to flush.