You have to run migrate
once for each database, specifying the target with --database
. Each time it will consult your router to see which migrations to actually perform on that database.
I’m guessing it was designed this way to favor explicitness over implicitness. For example, your workflow might require you to migrate the different databases at different times.
Note, though, that you won’t be able to tell from the output which migrations were actually performed, since:
If
allow_migrate()
returnsFalse
, any migration operations for themodel_name
will be silently skipped when runningmigrate
on thedb
.