I am building a Django powered site and I want to have separate databases for some of the apps, I build a flexible router that routes each app to predefined database, this works fine.
The problem is that when I am migrating my models I have to set the
I don't know of any way to do that automatically. However, a simple approach might be to write your own version of the
migrate command that calls the Django
migrate command multiple times with the appropriate
--database and app arguments.
According to the author of Django migrations, this is a conscious design decision, so I wouldn't expect it to change: "Just like syncdb, migrate only runs on one database at a time, so you must execute it individually for each database, as you suggest. This is by design."