When to run migrations when using maestro

When is the best time to run database migrations when using maestro to deploy docker images?

Right now I have a rake task in deploy_command but that does not run the migrations.