﻿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
12499	Allow a model's Meta to specify a single multi-db alias	crucialfelix <crucialfelix@…>	nobody	"Some, perhaps most models are clearly intended to work only with one connection or another in a multi-db project.  

Currently you can specify:

   objects = ModelManager().db_manager('legacy')

but I think the manager by default could look for:

class Meta:
   connection = 'legacy'

and automatically bind to that connection

also I've run into a problem when running tests.  the test runner causes each connection to create a test db which then creates all models on all connections.  

if a connection does not support gis, or the model is not intended to be run on that connection ever, then the test db shouldn't create that table.  thus I think that a model should be able to specify a single connection alias.

the above Meta setting would allow create_test_db to only create tables as needed for that connection.

"		closed	Database layer (models, ORM)			wontfix	multi-db	crucialfelix@…	Unreviewed	0	0	0	0	0	0
