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

Django 2.0 compatibility: Add mandatory on_delete argument to foreign keys #47

Merged
merged 3 commits into from
Jan 11, 2018

Conversation

decibyte
Copy link
Contributor

Fixes #46.

I'm intentionally adding this to the existing migration.

`makemigrations` do not create a new migration for the `on_delete`
changes to the fields.

I also tried adding a new model without the argument (and Django 1.11),
for which the migration _did_ include the argument (defaults to
`models.CASCADE`). If I explicitly removed the `on_delete` argument from
that migration, added `on_delete` to the model and ran `makemigrations`
again, it did not create a new migration.

So I assume it's safe to just add it to the existing migration, to make
it compatible with the most recent versions of Django.
@decibyte
Copy link
Contributor Author

@scoursen I tried running the test suite, but following the instructions in the README doesn't work for me, and I couldn't figure out how to get it to work.

@scoursen
Copy link
Owner

I think enough things have changed over the years that the test suite no longer works as described in the README.

I'm creating an issue to fix that.

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

Successfully merging this pull request may close these issues.

None yet

2 participants