-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not migrate if the router check does not pass
Prior to this change, we weren't checking if the database router allowed the migration to proceed. We thus add the router.allow_migrate() check, which is the same that the RunSQL operation runs internally. Ref: - https://github.com/django/django/blob/7adb6dd98d50a238f3eca8c15b16b5aec12575fd/django/db/migrations/operations/special.py#L105 A possible error that would raise before this fix happens when the Django applicatoin has multiple databases and the migration should be routed to only apply on a particular database.
- Loading branch information
1 parent
e45c43c
commit 9180c4e
Showing
4 changed files
with
128 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters