Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#1843 closed defect (fixed)

syncdb should create intermediary tables

Reported by: pb@… Owned by: Adrian Holovaty
Component: Core (Management commands) Version:
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


In general, we count on syncdb to create any tables that need to be created, and not to touch ones that already exist. Intermediary tables needed by M2M relations fall through the cracks -- presumably because they don't have separate models explicitly declared . Unless I'm missing some risk, these tables should be created by syncdb.

Change History (1)

comment:1 Changed 14 years ago by Malcolm Tredinnick

Resolution: fixed
Status: newclosed

This looks to have been fixed since being filed. If you add a new model to an application and that new model contains a ManyToManyField, we correctly create the intermediate table. The syncdb command will not create the intermediate table if you add a new field to an existing model, but that is because it does not handle model changes -- only creating new models (we don't include the new field either in that case).

Note: See TracTickets for help on using tickets.
Back to Top