#36992: Migrations that belong to apps that are always routed to different
databases can be shortcut to be "faked" earlier
-------------------------------------+-------------------------------------
     Reporter:  Suzannah Cooper      |                    Owner:  (none)
         Type:                       |                   Status:  closed
  Cleanup/optimization               |
    Component:  Migrations           |                  Version:  6.0
     Severity:  Normal               |               Resolution:  duplicate
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Simon Charette):

 * resolution:   => duplicate
 * status:  new => closed

Comment:

 The database operations rely on `Operation.allow_migrate_model` (which
 calls `Options.can_migrate`) and `Router.allow_migrate_model` which
 eventually delegate to `Router.allow_migrate` to determine if a model
 should be migrated.

 The `allow_migrate_model` functions expect a fully built model class to be
 provided as it relies on `required_db_features` and `required_db_vendor`
 which are both options we don't track in migrations.

 In my opinion this is a duplicate of #29898 which tracks making the
 migration framework operate from `ModelState` instead of dynamically
 rendering model classes (I suspect a lot of time is spent in
 `ModelBase.__new__`, `ModelState.render`, and `ModelState.render_multiple`
 here).
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36992#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 view this discussion visit 
https://groups.google.com/d/msgid/django-updates/0107019d01f6c619-6f7dfaf8-0a22-482e-a0a6-12806114fa90-000000%40eu-central-1.amazonses.com.

Reply via email to