#32067: Add Operation.allow_migrate().
-------------------------------+--------------------------------------
     Reporter:  George Sakkis  |                    Owner:  nobody
         Type:  New feature    |                   Status:  closed
    Component:  Migrations     |                  Version:  3.1
     Severity:  Normal         |               Resolution:  needsinfo
     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 felixxm):

 * status:  new => closed
 * cc: Loic Bistuer, Markus Holtermann (added)
 * type:  Cleanup/optimization => New feature
 * component:  File uploads/storage => Migrations
 * resolution:   => needsinfo


Comment:

 Thanks for this ticket. I think it's reasonable to add
 `Operation.allow_migrate()` that would be called by special operations
 `RunSQL()` and `RunPython()`, e.g.
 {{{
 def allow_migrate(self, db, app_label, **hints):
     return router.allow_migrate(db, app_label, **hints)
 }}}

 however I don't think it's a desired change to call it in the model-
 specific operations that rely on `allow_migrate_model()` because currently

 `Operation.allow_migrate_model()` --- calls --->
 `Router.allow_migrate_model()` --- calls ---> `Router.allow_migrate()`

 I don't see where in this flow we could call the new
 `Operation.allow_migrate()` without breaking the current behavior.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32067#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 on the web visit 
https://groups.google.com/d/msgid/django-updates/065.18038367d1109da70063b891f27d5bb0%40djangoproject.com.

Reply via email to