#29350: Sqlite3 Introspection (get_primary_key_column) Always Returns None
-------------------------------------+-------------------------------------
Reporter: Zackary Troop | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: 2.0
(models, ORM) |
Severity: Normal | Resolution:
Keywords: sqlite3 | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Zackary Troop):
Small tweak in the introspection.py in the sqlite3 backend will fix this.
I can setup the PR tonight.
{{{
>>> for field_desc in fields_sql.split(','):
... field_desc = field_desc.strip()
... m = re.match(r"(\w+).*PRIMARY KEY(?: AUTOINCREMENT)?.*",
field_desc)
... if m:
... print(m.group(1))
...
id
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/29350#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/064.ba080fd152c0dfe8bd4169503db8535b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.