#27142: makemigrations fails on special database connections
---------------------------------+------------------------------------
     Reporter:  gerricom         |                    Owner:  nobody
         Type:  Bug              |                   Status:  new
    Component:  Migrations       |                  Version:  1.10
     Severity:  Release blocker  |               Resolution:
     Keywords:                   |             Triage Stage:  Accepted
    Has patch:  0                |      Needs documentation:  0
  Needs tests:  0                |  Patch needs improvement:  0
Easy pickings:  0                |                    UI/UX:  0
---------------------------------+------------------------------------

Comment (by shaib):

 Replying to [comment:7 timgraham]:
 >
 > I think it's possible to use multiple databases without using database
 routers. For example, `migrate` requires a database alias, so if you have
 a read-only database, it's usable without a router as long as you don't
 try to migrate it. (I didn't test it so I could be incorrect but perhaps
 someone can confirm that.)
 >
 > I think consulting database routers could still be a backwards-
 incompatible change for some users since it would now require routers to
 be setup for read-only databases.

 No database routers would mean that, by default, all queries would run
 against the `default` database; perhaps in that case we should only check
 for consistency against it. If the history were consistent in `default`
 and inconsistent elsewhere, it would suggest to me that the problem is in
 that database rather than migration files, and so catching it in `migrate`
 would be sufficient.

 Perhaps even generally, if `default` allows migrating the app, there is no
 need to check for consistency on other databases.

 Replying to [comment:8 sjoerdjob]:
 > How about the intermediate option of adding a `--no-check-consistency`
 command line argument.

 I'm -0 on this as a feature, and -1 on an interim solution. I am neutral 0
 on a `--no-force-consistency` which turns all errors encountered in
 consistency checking into warnings.

--
Ticket URL: <https://code.djangoproject.com/ticket/27142#comment:9>
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/066.01e8a42d9a3b2580a0080c9d6fb5c55d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to