You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a project with a lot of migrations, with 3 important migrations for our case (in that order):
a migration that add the field foo to the model Bar
a migration that has a RunPython, doing some computation based on the field foo
a migration that remove the field foo
now if i first do
python manage.py migrate
I finish with a database without field foo => normal and expected
if I then run pytest --reuse-db I will got SQL failure because pytest re-runs all migrations, but without actually replaying the changes on the database , but only running the RunPython, so the RunPython of 2) is run on database were the field has already been removed
is it a known behaviour , if so why ?
I would have thought that it would see migrations has been run , and will not execute anything, runpython included