Open ntouran opened 2 years ago
I am getting a similar error on django 4.1 but not on 4.0.7. Which django version do you use?
I'm way back on 3.2.14
ok, I have found my issue to be a regression in django4 (https://code.djangoproject.com/ticket/33899)
I'm trying out
pytest-django
coming from a traditionalmanage.py test
workflow. After configuring, when I runpytest
all my tests are discovered properly, but they all fail with the same error during migrations. Exception shown below.Basically, the system is crashing while running a custom data migration that accesses a database column that was once defined, but then later removed (and migrated). This is typically handled in Django by using historical models, as in documented in the django docs.
But when running pytest-django it seems that the historical model system isn't working right?
Note that I am using django-simple-history for the HistoricalParameter model.
My data migration that's crashing looks like this:
The error is: