IntrospectionTests incorrectly validates an AutoField as an IntegerField
|Reported by:||manfre||Owned by:||manfre|
|Cc:||Triage Stage:||Ready for checkin|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
The Reporter model doesn't have an explicitly defined primary_key and should have an implicit AutoField(primary_key=True) added to the model.
None of the core backends support introspecting an AutoField, but some 3rd party backends do (django-mssql). I propose adding a new DatabaseFeature can_introspect_autofield that allows backends to decide whether they can distinguish between an AutoField and an IntegerField.
Change History (5)
comment:1 Changed 23 months ago by manfre
- Needs documentation unset
- Needs tests unset
- Owner changed from nobody to anonymous
- Patch needs improvement unset
- Status changed from new to assigned
comment:4 Changed 23 months ago by akaariai
- Triage Stage changed from Unreviewed to Ready for checkin