title: Heroku Run Migrations Before Deploying Code
body: <p>I would like to run migrations <em>before</em> deploying code to my Heroku instance. This is because the code I write is backwards compatible with my database and if the migrations take a long time I don't want to push the code first, put the app in maintence mode until the migrations are done and then take the app out of maintenence mode.</p>
  
  <p>If such a solution exists or something that would solve my problem I would like to know about it. Currently I have a separate box with all the code (and migrations) that accepts the push first then runs the migrations then deploys the code to Heroku.</p>
  
  <p>Is there a better solution?</p>