GibbsConsulting / django-plotly-dash

Expose plotly dash apps as django tags
MIT License
548 stars 125 forks source link

Migration issue happen with microsoft SQL server 2019, ODBC driver 17. #347

Open wsngsyswin opened 3 years ago

wsngsyswin commented 3 years ago

I start a new project in Django and then follow all the necessary steps in django-plotly-dash. After I try to run migration, the problem occur at migration number 3.

Running migrations: Applying django_plotly_dash.0001_initial... OK Applying django_plotly_dash.0002_add_examples... OK Applying django_plotly_dash.0003_auto_20210701_2319...Traceback (most recent call last):

last two lines of the error message show: raise NotImplementedError("the backend doesn't support altering from/to %s." % t.name) NotImplementedError: the backend doesn't support altering from/to AutoField.

I am using Django 3.2, pyodbc 4.0.30, mssql-django 1.0rc1, django-plotly-dash 1.6.4.

Anyone knows how to solve this issue ?

I have tried with PostgreSQL server and it ran the migrations perfectly. There was no problem occur.

GibbsConsulting commented 3 years ago

The database/driver has some limitations which are in conflict with the django_plotly_dash codebase.

If switching to a better-supported database (Postgresql is a much better fit with Django, basically) is not an option, then you could try changing the migrations to work around the limitation - code contributions are most welcome. However it would not be appropriate to constrain the project to the limited functionality of this database backend so there is no guarantee that other issues would not arise in the future.