Yii Framework Forum: Automating Migrations On Heroku - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Automating Migrations On Heroku Rate Topic: -----

#1 User is offline   aarondfrancis 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 6
  • Joined: 07-January 13

Posted 02 May 2013 - 09:48 AM

Hey guys, I've been struggling recently with how to make sure my migrations get run at the right time as I push to the remote webserver (I'm using Heroku). I finally came up with the solution, which I'll describe briefly in case it helps anyone else out.

You first have to set up a Procfile the defines the boot script as a copy of the standard boot script (something like web-boot.sh). Then you need to add to that boot script
bin/php www/protected/yiic.php migrate --interactive=0
. Now, every time you push code to Heroku, it will execute your migrations before your new code goes live. You can read the full post here: aaronfrancis.com/blog/2013/5/2/automate-yii-migrations-in-heroku and feel free to ask any questions, I'll do what I can to help.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users