Add validation for models with the same db_table
|Reported by:||Owned by:||nobody|
|Component:||Core (System checks)||Version:||master|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||yes||Patch needs improvement:||no|
When declaring two models using a custom db_table setting in the Meta class, I found out that django failed to detect that the two models declared the same db_table and subsequently it will fail on syncdb when trying to create the same table twice.
This, of course, was introduced by copy&paste, but at least django should report this on validate instead of failing when trying to syncdb.
Change History (16)
comment:1 Changed 4 years ago by
|Triage Stage:||Unreviewed → Accepted|
|Type:||Bug → Cleanup/optimization|
comment:11 Changed 18 months ago by
|Component:||Database layer (models, ORM) → Core (System checks)|
|Summary:||Django validate command fails to detect that multiple models declare the same db_table → Add validation for models with the same db_table|
|Type:||Cleanup/optimization → New feature|
|Version:||1.5 → master|