[Capistrano] Re: Regarding Capistrano (cap deploy:update), Existing database modification without losing the data.

2009-03-05 Thread Simone Carletti
I usually keep a production-like environment called staging. The staging area has the same features of the production enviroment but with all debugging settings enabled. Each new release is first deployed in staging at least once, then deployed to production. If something fails or some unit test d

[Capistrano] Re: Regarding Capistrano (cap deploy:update), Existing database modification without losing the data.

2009-03-05 Thread Peter Booth
I usually develop against a clone of production. Is the question how can I back out if the release fails? The flawed approach I have used is: 1. deploy code 2. dump a copy of production 3. migrate the copy DB 4. start new production against migrated DB The flaw in this is that if the app is st

[Capistrano] Re: Regarding Capistrano (cap deploy:update), Existing database modification without losing the data.

2009-03-05 Thread Lee Hambley
Peter, Running the migrations locally won't affect the "live" / "production" database? - Lee 2009/3/6 Peter Booth > > How does capistrano make this different than doing a migration locally? > > Peter Booth > (917) 445 5663 peter_bo...@mac.com > > On Mar 5, 2009, at 6:20 AM, Mike wrote: > > >

[Capistrano] Re: Regarding Capistrano (cap deploy:update), Existing database modification without losing the data.

2009-03-05 Thread Peter Booth
How does capistrano make this different than doing a migration locally? Peter Booth (917) 445 5663 peter_bo...@mac.com On Mar 5, 2009, at 6:20 AM, Mike wrote: > > Hi All, > > I have deployed my rails application using Capistrano it run well, Now > i want to update my application for that i hav

[Capistrano] Re: Help with custom task (moving contents of current)

2009-03-05 Thread Jamis Buck
Sorry, I misread your original message. I thought you were trying to replace the current symlink; and in general, if you need to muck with the core assumptions that much, it's easier to just write your own. I see that you were just wanting to do something after the push of the site. The before()

[Capistrano] Re: Help with custom task (moving contents of current)

2009-03-05 Thread matt mitchell
Interesting. I'll definitely consider that. The solution I just came up with involves using: grep -v www I'm curious about why you're strongly recommending against using the defaults? There must be something bigger I'm not thinking about... Matt On Mar 5, 2:36 pm, Jamis Buck wrote: > I would s

[Capistrano] Re: Help with custom task (moving contents of current)

2009-03-05 Thread Jamis Buck
I would strongly recommend that you not use the standard deploy tasks, and just write your own. - Jamis On 3/5/09 12:16 PM, goodieboy wrote: > Hi, > > I have a repo that's a simple static site. The trunk is the websites > document root. I need to deploy this site to a server that has current/ >

[Capistrano] Help with custom task (moving contents of current)

2009-03-05 Thread goodieboy
Hi, I have a repo that's a simple static site. The trunk is the websites document root. I need to deploy this site to a server that has current/ www as its document root, where "current" is the directory created by capistrano. I'm trying to figure out the best way to: create a www directory afte

[Capistrano] Re: Regarding Capistrano (cap deploy:update), Existing database modification without losing the data.

2009-03-05 Thread Simone Carletti
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

[Capistrano] Regarding Capistrano (cap deploy:update), Existing database modification without losing the data.

2009-03-05 Thread Mike
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 deploym