﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
21906	dumpdata should not use router.allow_migrate	yscumc		"I have two databases with a router in place to prevent syncdb from automatically creating tables on the 2nd database (referred to as: `second_database`).

When `manage.py dumpdata --database=second_database` is executed, an empty JSON array is printed: `[]`

Upon a lot of fumbling around, it seems that this behavior is caused by ticket #13308 in [[https://github.com/django/django/commit/7b47609629692241848469fabc24fa798c0ac70b|this commit]].

{{{
                if not model._meta.proxy and router.allow_syncdb(using, model):
}}}

For the `dumpdata` command to be dependent on the `router.allow_syncdb()` was totally unexpected because it is not documented anywhere and the name of the router method is `allow_syncdb()` which gives the impression that it only influences the `syncdb` command.

The `allow_syncdb` should ONLY affect `syncdb` and a separate method should be created for the `dumpdata`/`loaddata` commands. This would allow `dumpdata` to be run on a non-syncdb-able database.

Note: I do know there's a `Managed = False` meta option on each model and I could remove the `allow_syncdb` on my router as a workaround for my specific use case, but I still feel the current behavior is extremely counter-intuitive. Either the doc should be updated, or the alternative methods added to the router to determine the behavior for the other two non-syncdb commands."	Bug	new	Core (Management commands)	dev	Normal			"Stephane ""Twidi"" Angel anubhav9042@… Ülgen Sarıkavak"	Accepted	1	0	0	1	0	0
