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 12672,Add mechanism for controlling which models are synchronized onto which database in multidb,Russell Keith-Magee,nobody,"At present synchronizing multiple databases where you *dont* want certain models on certain databases is a little fiddly. If you want to exclude an entire app, you can use --exclude on syncdb, but if you just want to disable a a single model, you can't - you need to manually roll out your synchronization. There is also a problem during testing, since that can't be manually implemented. The usual suggestion here is an entry in settings.py, which would be exceedingly verbose and for the simple case, and worse for the complex case. However, a programmatic approach leveraging the new Database Router should work. We could add an 'allow_syncdb(using, model)' interface to syncdb; this gets interrogated by syncdb (and other places that need it) to determine if a model should be visible on the given alias. Default behaviour is ""yes""; the method can return True/False/None in the same way that allow_relation does right now. This would allow us to remove --exclude options from loaddata and syncdb, allows for test syncdb calls to be more specific, and would allow syncdb under normal operation to be completely automated.",,closed,"Database layer (models, ORM)",1.1,,fixed,,,Design decision needed,0,0,0,1,0,0