I have set up a database router to direct different apps and different models to different databases using the db_for_read
and db_for_write
router methods.
That works very well, except that ./manage.py syncdb
does't respect those router settings.
When I syncdb
my models, all of them are created in the default database.
The database router only provides an allow_syncdb
method, but no sync_to
method. Is there a way to tell the syncdb
command where to create the new tables?
Note: I can't use the --database
feature, as sometimes some of the model apps go to a different database than the rest of the app.