2010/12/17 Gustavo de Sá Carvalho Honorato <gustavohonor...@gmail.com>:
>
>
> On Fri, Dec 17, 2010 at 12:55 PM, Marnen Laibow-Koser <li...@ruby-forum.com>
> wrote:
>>
>> "Gustavo de Sá Carvalho Honorato" <gustavohonorato wrote in post
>> #969047:
>> > Hello,
>> >
>> > What are the good practices to deploy an Rails database in production?
>> > It is
>> > said that is unsafe to run database migrations in a production database,
>>
>> That's ridiculous.  Where did you get that information?
>
> Yes, I agree with you. It's very strange, but I saw this information in
> comments of generated schema.rb.
> # This file is auto-generated from the current state of the database.
> Instead of editing this file,
> # please use the migrations feature of Active Record to incrementally modify
> your database, and
> # then regenerate this schema definition.
> #
> # Note that this schema.rb definition is the authoritative source for your
> database schema. If you need
> # to create the application database on another system, you should be using
> db:schema:load, not running

Note the use of the word _create_ here.  It is saying that when you
initially _create_ the production db (or another) that you should use
the schema to create it.  It is not saying that for ongoing changes
_after_ the initial create that you should not use migrations.

Your original question was 'what are the procedures to update the
database schema in production' and the answer to that is use the
migrations that you used to update the development db.

Colin

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to