wemake-services / django-test-migrations

Test django schema and data migrations, including migrations' order and best practices.

Home Page:https://pypi.org/project/django-test-migrations/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Keep initial data in database after migration test

medihack opened this issue · comments

I am using django-test-migrations with pytest. My project depends on some initial data migration. After a migration test runs (using the migrator fixture) it seems my initial data is gone. I tried to set @pytest.mark.django_db(transaction=True, serialized_rollback=True), but the migrator does not seem to respect the serialized_rollback option. Is there another way to keep the initial data?

EDIT: I re-opened the issue as I am pretty sure now that it is an issue with django-test-migrations.