Description
Hello,
I want to migrate data from a legacy SQL server database (2008 R2) to a postgresql 11 application with django.
At first I did some export of SQL server tables to Excel, then python scripts to read these excel files and populate django models. This works, but I wanted to try and use django-pyodbc-azure to be able to read the table definition in SQL server and define legacy models with inspectb.
Now as soon as I installed django-pyodbc-azure and pyodbc, my development environment
was messed up. Each time I try "python manage.py runserver" I get the message:
Unhandled exception in thread started by <function check_errors..wrapper at 0x0000016B52539268>
Traceback (most recent call last):
....
AttributeError: module 'django.db.models' has no attribute 'UniqueConstraint'
and django won't start.
I do use UniqueConstraint in my models, and I didn't get this error message before I installed pyodbc and django-pyodbc-azure.
Even after uninstalling pyodbc and django-pyodbc-azure the error message persists.
I had to rebuild another virtual environment in order to get back a functioning development environment.
Any ideas?
Thanks
Daniel
Environment:
Windows 10 version 1903
conda 4.6.14
python 3.7.1
django 2.1.7
pyodbc 4.0.30
psycopg2 2.8.4 (postgresql is on a docker container, I use docker desktop for Windows)
postgresql 11.2 on docker
SQL server express 2008 R2 on Windows 10