-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DatabaseWrapper has no data_types #128
Comments
The change is mentioned here in Django's release notes: https://docs.djangoproject.com/en/1.10/releases/1.8/#database-backend-api "The data_types, data_types_suffix, and data_type_check_constraints attributes have moved from the DatabaseCreation class to DatabaseWrapper." |
chris-nlnz
pushed a commit
to chris-nlnz/django-pyodbc
that referenced
this issue
Nov 17, 2016
RossRogers
added a commit
that referenced
this issue
Nov 17, 2016
Fix data_types incompatibility with Django 1.8+, issue #128.
Fix my M. Chris in merge request #129. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Have an issue using django-pyodbc 1.0.0 with Django 1.8.15.
When saving (inserting) an object to a pyodbc database I get a
TypeError
when pyodbc tries to get thepk_db_type
(compiler.py line 533):Problem is that the
django.db.models.fields.Field.db_type
method in Django 1.8.15 tries to get the data_type from a different place than Django 1.7 did:Looking at pyodbc's code I see there is a data_types attribute on the DatabaseCreation model, but not on the DatabaseWrapper, whereas it seems to be the other way around with Django's built in DB engines. So this call fails as
connection.data_types
doesn't have any types in it, returnsNone
and the regexp split fails as it's not a string.Hope that makes sense, I don't know too much about django-pyodbc/Django database engine internals apart from what I discovered today so I apologise if I have misunderstood anything here.
The text was updated successfully, but these errors were encountered: