Changes between Initial Version and Version 2 of Ticket #8573


Ignore:
Timestamp:
Aug 28, 2008, 11:13:52 AM (16 years ago)
Author:
Ramiro Morales
Comment:

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 charactersinspectdb doesn't make use of FK and uniqueness information when the column name has upper case characters
  • Ticket #8573 – Description

    initial v2  
    11This 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`.
    22
    3 Problem is it doesn't use the real database column name but rather a derived `attname` 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).
     3Problem 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).
    44
    5 Also, because a related problem, it can attempt to use that same `attname` instead of the real table column in the `db_column` field option.
     5Also, 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.
    66
    77Example:
     
    3333}}}
    3434
    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.
     35Note 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
Back to Top