#23273: MigrationRecorder does not obey db_router allow_migrate rules
----------------------------+---------------------------------------
     Reporter:  froomzy     |                    Owner:  Jacob Walls
         Type:  Bug         |                   Status:  assigned
    Component:  Migrations  |                  Version:  dev
     Severity:  Normal      |               Resolution:
     Keywords:              |             Triage Stage:  Accepted
    Has patch:  0           |      Needs documentation:  0
  Needs tests:  0           |  Patch needs improvement:  0
Easy pickings:  0           |                    UI/UX:  0
----------------------------+---------------------------------------
Changes (by Jacob Walls):

 * owner:  nobody => Jacob Walls
 * status:  new => assigned


Comment:

 Since 3.1 you can set `'TEST': {'MIGRATE': False}` to avoid running
 migrations on a given db connection, so that solves the test runner issue.

 Still, even if you do that, apps are still synced (see fix to #32012),
 Django ends up calling `migrate` to do the syncing, and this will cause
 queries in `MigrationRecorder.ensure_schema()` that might create tables
 (or fail with permission errors, see #27141).

 I plan to open a PR to do roughly this from comment:13:
 `it shouldn't try to create the migration table on a database if it
 doesn't need to record any migrations there`

-- 
Ticket URL: <https://code.djangoproject.com/ticket/23273#comment:19>
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 django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.0d53e81d715c2d29d4214e6a2b806290%40djangoproject.com.

Reply via email to