[Answered ]-Collation Error When creating Django Database Models

1👍

Confirmed through independent testing that the issue does appear to be a bug in version 3.2 and will put in a bug report. However I did come out with a workaround for now as follows:

  • Create new temporary virtual environment
  • Install django==3.0 pyodbc==4.0 django-mssql-backend==1.8
  • Create the database entry for the SQL Server in settings.py
  • run python manage.py inspectdb --database=yourentry > yourentry.py

Once you have created all the models for the existing database you want to use in your website you can grab each of the yourentry.py files and copy them to a submodel folder and import them into the main models.py file.

When the virtual environment is no longer needed it can be deleted.

Leave a comment