#33143: Block import-time queries
-------------------------------------+-------------------------------------
     Reporter:  Adam Johnson         |                    Owner:  nobody
         Type:                       |                   Status:  new
  Cleanup/optimization               |
    Component:  Database layer       |                  Version:  dev
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Simon Charette):

 I'd be in favor of blocking until *after* `AppConfig.ready()` phase as any
 queries performed at `.ready()` time has the potential to crash due to
 still unapplied migrations (missing table, schema mismatch) and can get
 users in a pickle where they can't even run `migrate`.
 
[https://docs.djangoproject.com/en/3.2/ref/applications/#django.apps.AppConfig.ready
 This is something we've been warning against for a while] and that I've
 had to point to a fair amount of time when reviewing Django project
 changes.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/33143#comment:2>
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.9d35a323d3b1056fd265ccf29eb28ec4%40djangoproject.com.

Reply via email to