wemake-services / django-test-migrations

Test django schema and data migrations, including migrations' order and best practices.
https://pypi.org/project/django-test-migrations/
MIT License
517 stars 31 forks source link

Keep initial data in database after migration test #438

Open medihack opened 5 months ago

medihack commented 5 months ago

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.