#21906: dumpdata should not use router.allow_migrate -------------------------------------+------------------------------------- Reporter: yscumc | Owner: Hasan | Ramezani Type: Bug | Status: assigned Component: Core (Management | Version: 1.5 commands) | Severity: Normal | Resolution: Keywords: | Triage Stage: Accepted Has patch: 1 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------------+------------------------------------- Changes (by Hasan Ramezani):
* owner: (none) => Hasan Ramezani * status: new => assigned * has_patch: 0 => 1 Comment: Here is Aymeric Augustin comment: > With the current database router API, all dumpdata and loaddata can do with router information is check db_for_read and db_for_write to determine which database to use by default for each model. Most likely the ORM already does this automatically. I created a [https://github.com/django/django/pull/12718 PR] to set `router.db_for_write()` as default value for `--database` option in `dumpdata`. Question: Do we still need [https://github.com/django/django/blob/5b884d45ac5b76234eca614d90c83b347294c332/django/core/management/commands/dumpdata.py#L166 router.allow_migrate_model(using, model) check]? I am going to create another PR for `loaddata` if this one will be accepted. -- Ticket URL: <https://code.djangoproject.com/ticket/21906#comment:11> 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/064.98c469d121d2d99792421ce1ed3f0ec9%40djangoproject.com.