Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider adding django-test-migrations #290

Open
sobolevn opened this issue Nov 25, 2019 · 1 comment
Open

Consider adding django-test-migrations #290

sobolevn opened this issue Nov 25, 2019 · 1 comment

Comments

@sobolevn
Copy link
Contributor

@sobolevn sobolevn commented Nov 25, 2019

I know that django-celery-beat had some issues with migrations back in the days.

I am proposing to add the support of testing migration files to prevent errors like:

  1. Inconsistent migrations order, like here: https://github.com/celery/django-celery-beat/blob/master/django_celery_beat/migrations/0006_periodictask_priority.py#L9
  2. Possibly incompatible changes to existing models in a complex migrations, like this one: https://github.com/celery/django-celery-beat/blob/master/django_celery_beat/migrations/0010_auto_20190429_0326.py#L22

This can be done with the help of https://github.com/wemake-services/django-test-migrations

I would be glad to hear your feedback if any.

@liquidpele
Copy link
Contributor

@liquidpele liquidpele commented Dec 8, 2019

I added tests because of those issues, see https://github.com/celery/django-celery-beat/blob/master/t/unit/test_models.py#L14

Also the tox file now does these tests starting from various versions so there's full coverage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.