#7536 closed (fixed)
mysql inspectdb unable to handle newdecimal
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | django-admin.py inspectdb | Version: | dev |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Description:
doing inspectdb on a mysql newdecimal field is converted as a TextField instead of a decimal.
mysql 5 got a type "newdecimal" MYSQL_TYPE_NEWDECIMAL) and this is not handled by django inspectdb.
DATA_TYPES_REVERSE in mysql introspection.py doesnt contains the FIELD_TYPE.NEWDECIMAL from mysqldb-python. So in DATA_TYPE_REVERSE, i just added
FIELD_TYPE.NEWDECIMAL: 'DecimalField',
the patch is attached
Attachments (1)
Change History (6)
by , 17 years ago
Attachment: | patch_django added |
---|
comment:1 by , 16 years ago
milestone: | → 1.0 |
---|---|
Triage Stage: | Unreviewed → Accepted |
comment:2 by , 16 years ago
comment:3 by , 16 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
nm, just checked on 1.2.1 and it works.
comment:4 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Does
MySQLdb
support this, and if so what's the oldest version that does support it?