I'd like to share some thoughts on how I'm updating a cakephp app I've been working on and I'd apprecciate to hear how you do it for your apps ...
I'm about to make some important changes on this website that is already in production mode and I wonder if there is any way to do it using only git hooks and the cake console. In a couple of days I'll need to create a new table on the production database and change / add some fields in existing tables. So far to update this app I used only a pretty small script on a git post-receive hook of the bare repository on my server, like this ( it runs every time I use a 'git push origin master' from my local machine ): cd ~/myapp/public_html/ env -i git reset --hard env -i pull origin master which already saved me from having to use any ftp client. But now with this lots of changes I have to do in my production database I'm not sure if cake console migrattions can do that automatically. Does schema update really only alter tables? I mean what do you do to update a database without having to create tables by hand? Besides creating and modifying tables with migrattions I guess I also have to write some kind of shell script to clear all cache on my application so that models are refreshed. Otherwise it won't recognize the recently added table fields, Am I right about that? Or there is any other way for models to be refreshed on production mode? If I could add only two more lines to the git hook script mentioned above, one for updating the database, including creating new tables if necessary, something like "cake schema update" to run the last schema created. And other line to execute a shell script to clear all cache ... Updating this app and others by this example would be so much faster and secure ... Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
