#32767: inspectdb and sql non-boolean issues
-------------------------------------+-------------------------------------
               Reporter:             |          Owner:  nobody
  kinglion580                        |
                   Type:  Bug        |         Status:  new
              Component:  Database   |        Version:  3.2
  layer (models, ORM)                |
               Severity:  Release    |       Keywords:  inspectdb, mssql,
  blocker                            |  non-boolean
           Triage Stage:             |      Has patch:  0
  Unreviewed                         |
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 **enviornment:**
 python: 3.8
 django: 3.2.3
 pyodbc: 4.0.03
 django-mssql-backend: 2.8.1


 I'm sure the database config is correct.
 1. when I run: python manage.py inspectdb, it come out issues like this:
 {{{
 # Unable to inspect table 'AllowList'
 # The error was: __new__() missing 1 required positional argument:
 'collation'
 }}}

 ps: when I change django version to 3.1x or 2.x, inspectdb can produce
 model.


 2. when I use
 {{{
 filetypes =
 Uploadfiletypes.objects.filter(status=True).order_by('filetype')
 }}}

 it produce this issue:

 {{{
 ('42000', "[42000] [Microsoft][ODBC Driver 17 for SQL Server][SQL
 Server]An expression of non-boolean type specified in a context where a
 condition is expected, near 'ORDER'. (4145) (SQLExecDirectW)")
 }}}

 I'm sure status is a boolean field, and True is a boolean type value. when
 I change the django version to 2.x, it don't have this issue.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32767>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/054.ea0ac2d9d4cba27b323bbd8bfcd2443c%40djangoproject.com.

Reply via email to