Changes between Initial Version and Version 2 of Ticket #8573
- Timestamp:
- Aug 28, 2008, 11:13:52 AM (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #8573
- Property Has patch set
- Property Summary inspectdb doesn't make use of FK information when the column name has upper case characters → inspectdb doesn't make use of FK and uniqueness information when the column name has upper case characters
-
Ticket #8573 – Description
initial v2 1 1 This was reported as an [http://code.google.com/p/django-pyodbc/issues/detail?id=12 issue] in the [http://code.google.com/p/django-pyodbc/ django-pyodbc] project but after some debugging turned to be a bug in `inspectdb`. 2 2 3 Problem is it doesn't use the real database column name but rather a derived `att name` value (used to represent the final Django model field name) when looking up the meta information about FK and indexes the DB backend provides via the `DatabaseIntrospection.get_relations()` method. This fails for database engines that are case sensitive (i.e. all but Oracle).3 Problem is it doesn't use the real database column name but rather a derived `att_name` value (used to represent the final Django model field name) when looking up the meta information about FK and indexes the DB backend provides via the `DatabaseIntrospection.get_relations()` method. This fails for database engines that are case sensitive (i.e. all but Oracle). 4 4 5 Also, because a related problem, it can attempt to use that same `attname` instead of the real table column inthe `db_column` field option.5 Also, because of a related problem, it can attempt to use that same innaccurate `att_name` instead of the real table column when trying to introspect the `db_column` field option. 6 6 7 7 Example: … … 33 33 }}} 34 34 35 Note the `ident` field of the `Magazine` model is missing `'primary_key=True'` and `db_column='Ident'` options, that's because the `syncdb` command didn't make use of the `'primary_key': True` info the database backend introspection support code correctly returned for it. 35 Note the `ident` field of the `Magazine` model is missing: 36 37 a. The `'primary_key=True'`option(that's because the `syncdb` command didn't make use of the `'primary_key': True` info the database backend introspection support code correctly returned for it.) 38 b. The `db_column='Ident'` option