Opened 17 years ago
Closed 17 years ago
#5740 closed (invalid)
oracle inspectdb CharFields missing "max_length"
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | django-admin.py inspectdb | Version: | dev |
Severity: | Keywords: | oracle | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
forgive the flimsy report - I don't have an oracle db to confirm this. I hacked the oracle code up to work with ceODBC, and inspectdb generated
td_fil = models.CharField(blank=True)
which causes syncdb:
"td_fil": CharFields require a "max_length" attribute.
because
"CharField has an extra required argument, max_length, the maximum length (in characters) of the field. The max_length is enforced at the database level and in Django’s validation." http://www.djangoproject.com/documentation/model-api/#charfield
I don't think my hacks caused that. but it would be really nice if someone could confirm it.
Change History (3)
comment:1 by , 17 years ago
comment:3 by , 17 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
100% sure:
odbc: ('cd_fil', 'STRING', 16, 16, 0, 0, 1) ceODBC: ('cd_fil', <type 'ceODBC.StringVar'>, None, None, 16, 0, True),
This may be a bug/issue with ceODBC's cursor.description(). or not. here is some relevant code:
core/management/commands/inspectdb.py
...
...
introspection.py
def get_table_description(cursor, table_name):