You should use Rails Migrations. http://api.rubyonrails.org/classes/ActiveRecord/Migration.html
Then when you deploy your Rails app you simply need to ask capistrano to run pending migrations after the code checkout. There are a couple of tasks to do so. cap deploy:migrate runs pending migrations without deploying a new app cap deploy:migrations deploys a new project and runs the pending migrations. -- Simone On Thu, Mar 5, 2009 at 12:20 PM, Mike <[email protected]> wrote: > > Hi All, > > I have deployed my rails application using Capistrano it run well, Now > i want to update my application for that i have the latest code i ll > update it, i don't how to alter,add table to my database without > losing the existing data. plz guide me to do so.. > > I follow the tutorial for deployment in Capistrano site : > http://www.capify.org/ > But i didn't get the exact solution for that. For new deployment it > helped me a lot. > > I use subversion for scm > > Capistrano 2.x version for deployment > > Mysql db > > [r...@web01nrt gems]# httpd -v > Server version: Apache/2.2.3 > Server built: Jan 15 2008 20:33:30 > > [r...@web01nrt gems]# ruby -v > ruby 1.8.6 (2007-09-24 patchlevel 111) [i686-linux] > > Application layer server : Mongrel 1.1.5 and i used mongrel_cluster > > For your additional information : > > actionmailer-1.3.6 > actionpack-1.13.6 > actionwebservice-1.2.6 > activerecord-1.15.6 > activesupport-1.4.4 > cgi_multipart_eof_fix-2.5.0 > daemons-1.0.10 > fastthread-1.0.1 > gem_plugin-0.2.3 > mongrel-1.1.5 > mongrel_cluster-1.0.5 > mysql-2.7 > rails-1.2.6 > rake-0.8.2 > rmagick-2.6.0 > sources-0.0.1 > > > > --~--~---------~--~----~------------~-------~--~----~ To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/capistrano -~----------~----~----~----~------~----~------~--~---
