sql sequence reset misses the m2m tables
|Reported by:||exoweb adrian||Owned by:||adrian|
|Component:||Core (Management commands)||Version:|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
The sql sequence reset code in django.core.management misses the tables that are generated for the many to many fields.
For example, my Word model is many to many to my Meaning model. Now I have tables "words", "meanings" and "words_meanings". I also have the sequences "words_id_seq", "meanings_id_seq" and "words_meanings_id_seq". I invalidate my id sequences somehow, maybe by manually loading some data into the db, so I have to run the commands given by the get_sql_sequence_reset function. Now the "words_id_seq" and "meanings_id_seq" get fixed, but "words_meanings_id_seq" is still wrong.
This is more a fault of postgresql than django, but it would be nice if the sequence_reset code also worked for those of us with m2m fields in our models.