#32672: Primary Key, type double and type unsigned integer ain't detected
correctly
for Sqlite3 Database
-------------------------------------+-------------------------------------
Reporter: jgr88 | Owner: jgr88
Type: Bug | Status: assigned
Component: Database layer | Version: 3.2
(models, ORM) |
Severity: Normal | Resolution:
Keywords: SQLite3 PrimaryKey | Triage Stage: Accepted
Datatypes |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Mariusz Felisiak):
I'm fine with fixing detection of primary key, but I think we should not
add datatypes that are not used by Django itself. I also don't see a
reason to add only `DOUBLE`.
SQLite uses complicated rules to determine a datatype affinity based on
its name (see [https://www.sqlite.org/datatype3.html#affname
"Determination Of Column Affinity"] which have a lot of caveats, e.g.
- `CHARINT` is mapped to `INT`,
- `POINT` is mapped to `INT`,
- `STRING` is mapped to `NUMERIC`.
I would prefer to warn users about datatypes that are not used by Django
instead of mapping some/all of them.
--
Ticket URL: <https://code.djangoproject.com/ticket/32672#comment:5>
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 view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/073.a8e94ebe65d51009e462d6334c8fd965%40djangoproject.com.