On PR https://github.com/django/django/pull/11630, changes were made to
change to allow for multiple models with the same `db_name`. Instead of an
`Error` (`models.E028`), a `Warning` was created to be used in lieu of it,
when `DATABASE_ROUTERS` is present.
The same issue arises, with a different check, when using
`ManyToManyField`, with clashing `db_name`s. The system check in question
is `fields.E340`.
My suggestion would be to do apply the same change for this check, and
raise a `Warning` instead, whenever `DATABASE_ROUTERS` exists.
At this point, the only workaround is silencing the error system check.
--
Ticket URL: <https://code.djangoproject.com/ticket/31277>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* owner: nobody => Xavier Francisco
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/31277#comment:1>
* has_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/31277#comment:2>
* version: 3.0 => master
* stage: Unreviewed => Accepted
Comment:
[https://github.com/django/django/pull/12461 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/31277#comment:3>
* needs_better_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/31277#comment:4>
* needs_better_patch: 1 => 0
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/31277#comment:5>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"86908785076b2bbc31b908781da6b6ad1779b18b" 86908785]:
{{{
#!CommitTicketReference repository=""
revision="86908785076b2bbc31b908781da6b6ad1779b18b"
Fixed #31277 -- Relaxed system check of m2m intermediary tables for
db_table collision when database routers are installed.
Turned the error into a warning when database routers are installed.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/31277#comment:6>