[Django] #21097: IntrospectionTests incorrectly validates an AutoField as an IntegerField

1 view
Skip to first unread message

Django

unread,
Sep 12, 2013, 9:50:11 AM9/12/13
to django-...@googlegroups.com
#21097: IntrospectionTests incorrectly validates an AutoField as an IntegerField
-----------------------------------+-----------------------
Reporter: manfre | Owner: nobody
Type: Bug | Status: new
Component: Testing framework | Version: master
Severity: Normal | Keywords: inspectdb
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------------+-----------------------
The Reporter model doesn't have an explicitly defined primary_key and
should have an implicit {{{AutoField(primary_key=True)}}} added to the
model.

https://docs.djangoproject.com/en/dev/topics/db/models/#automatic-primary-
key-fields

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.

--
Ticket URL: <https://code.djangoproject.com/ticket/21097>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Sep 12, 2013, 9:50:33 AM9/12/13
to django-...@googlegroups.com
#21097: IntrospectionTests incorrectly validates an AutoField as an IntegerField
-----------------------------------+--------------------------------------
Reporter: manfre | Owner: anonymous
Type: Bug | Status: assigned

Component: Testing framework | Version: master
Severity: Normal | Resolution:

Keywords: inspectdb | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-----------------------------------+--------------------------------------
Changes (by manfre):

* owner: nobody => anonymous
* needs_docs: => 0
* status: new => assigned
* needs_tests: => 0
* needs_better_patch: => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/21097#comment:1>

Django

unread,
Sep 12, 2013, 9:51:30 AM9/12/13
to django-...@googlegroups.com
#21097: IntrospectionTests incorrectly validates an AutoField as an IntegerField
-----------------------------------+--------------------------------------
Reporter: manfre | Owner: manfre
Type: Bug | Status: assigned

Component: Testing framework | Version: master
Severity: Normal | Resolution:

Keywords: inspectdb | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-----------------------------------+--------------------------------------
Changes (by manfre):

* owner: anonymous => manfre


--
Ticket URL: <https://code.djangoproject.com/ticket/21097#comment:2>

Django

unread,
Sep 12, 2013, 10:10:42 AM9/12/13
to django-...@googlegroups.com
#21097: IntrospectionTests incorrectly validates an AutoField as an IntegerField
-----------------------------------+--------------------------------------
Reporter: manfre | Owner: manfre
Type: Bug | Status: assigned
Component: Testing framework | Version: master
Severity: Normal | Resolution:

Keywords: inspectdb | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-----------------------------------+--------------------------------------
Changes (by manfre):

* has_patch: 0 => 1
* easy: 0 => 1


Comment:

https://github.com/django/django/pull/1621

--
Ticket URL: <https://code.djangoproject.com/ticket/21097#comment:3>

Django

unread,
Sep 12, 2013, 10:41:28 AM9/12/13
to django-...@googlegroups.com
#21097: IntrospectionTests incorrectly validates an AutoField as an IntegerField
-------------------------------------+-------------------------------------

Reporter: manfre | Owner: manfre
Type: Bug | Status: assigned
Component: Testing framework | Version: master
Severity: Normal | Resolution:
Keywords: inspectdb | Triage Stage: Ready for
Has patch: 1 | checkin
Needs tests: 0 | Needs documentation: 0
Easy pickings: 1 | Patch needs improvement: 0
| UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by akaariai):

* stage: Unreviewed => Ready for checkin


Comment:

Seems to be ready. I can likely commit this tomorrow.

--
Ticket URL: <https://code.djangoproject.com/ticket/21097#comment:4>

Django

unread,
Sep 14, 2013, 2:53:31 AM9/14/13
to django-...@googlegroups.com
#21097: IntrospectionTests incorrectly validates an AutoField as an IntegerField
-------------------------------------+-------------------------------------
Reporter: manfre | Owner: manfre
Type: Bug | Status: closed

Component: Testing framework | Version: master
Severity: Normal | Resolution: fixed

Keywords: inspectdb | Triage Stage: Ready for
Has patch: 1 | checkin
Needs tests: 0 | Needs documentation: 0
Easy pickings: 1 | Patch needs improvement: 0
| UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Anssi Kääriäinen <anssi.kaariainen@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"c89d80e2cc9bf1f401aa3af4047bdc6f3dc5bfa4"]:
{{{
#!CommitTicketReference repository=""
revision="c89d80e2cc9bf1f401aa3af4047bdc6f3dc5bfa4"
Fixed #21097 - Added DatabaseFeature.can_introspect_autofield
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/21097#comment:5>

Reply all
Reply to author
Forward
0 new messages