-
Notifications
You must be signed in to change notification settings - Fork 138
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
Establish on_delete for ForeignKey re Django update #2645
Comments
Just have to sort out the appropriate migration file for all these changes and some back-log we have in the migration area and can then present a pull request against this issue. |
Notes on the creation of the associated new migration files:
|
The new migration files do not contain the new on_delete. It is currently assumed this is as a result of having back-ported the on_delete additions to our existing migration files. However there does exist entries in the migration files stating an AlterField for each affected model. |
Test migrations of within an initrock prepared database set look to apply as expected:
|
Adds now required on_delete argument to all ForeignKey and OneToOneField definitions: in both model definitions and all prior migration files. The resulting migration files for storageadmin (default) and smart_manager were created via: - poetry run django-admin makemigrations storageadmin - poetry run django-admin makemigrations smart_manager
…ForeignKey-re-Django-update Establish on_delete for ForeignKey re Django update #2645
Closing as: |
In part preparation for "Provisional Django 2.2 LTS update #2625" we need to update our models and migrations re:
RemovedInDjango20Warning: on_delete will be a required arg for ForeignKey in Django 2.0. Set it to models.CASCADE on models and in existing migrations if you want to maintain the current default behavior. See https://docs.djangoproject.com/en/1.11/ref/models/fields/#django.db.models.ForeignKey.on_delete
RemovedInDjango20Warning: on_delete will be a required arg for OneToOneField in Django 2.0. Set it to models.CASCADE on models and in existing migrations if you want to maintain the current default behavior. See https://docs.djangoproject.com/en/1.11/ref/models/fields/#django.db.models.ForeignKey.on_delete
Many more reports like above though-out most of our models.
[EDIT] The following checklist was sed prepared from the full version of the above after all duplicate warnings (and leading src path) were first removed via a regular editor:
The above item was resolved by the below related fixes.
Performing system checks...
System check identified no issues (0 silenced).
The text was updated successfully, but these errors were encountered: