#25172: System checks don't respect database routers
-------------------------------------+-------------------------------------
     Reporter:  delinhabit           |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Core (System         |                  Version:  1.7
  checks)                            |
     Severity:  Normal               |               Resolution:
     Keywords:  system-checks        |             Triage Stage:  Accepted
  multi-database                     |
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by timgraham):

 * needs_better_patch:   => 0
 * needs_tests:   => 0
 * needs_docs:   => 0
 * type:  Uncategorized => Bug
 * stage:  Unreviewed => Accepted


Comment:

 I think the code for `_check_backend_specific_checks()` would be roughly
 like this:
 {{{
 from django.db import connections
 for db in connections:
    if allow_migrate(...):
       db.validation.check_field(self, **kwargs)
 }}}
 Let's get some working code and then we can talk about how to test this. I
 guess it might involve mocking `connections` to have two different
 databases as we don't run the tests against two different databases on CI
 and getting that to work might not be feasible.

--
Ticket URL: <https://code.djangoproject.com/ticket/25172#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.06955cb11a6095167fd0104e8d2dfe9f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to