On 21 August 2011 03:23, coolesting <[email protected]> wrote:
> But i still have a question, can i design a database schema for migrating
> once time. I don't want gonna to create a migration file for some operation
> to database again and again.
> Just creating a schema file for initializing the database at first.

I don't see why you want to write a schema manually rather than just
writing the first migration manually.  It is just as easy to write the
inital migration as an initial schema.  In fact the syntax is almost
identical.  However, if you do want to do that then you can use rake
db:create to create the db from the schema.  Note that this is not the
question you asked originally, which was how to update the db from an
updated schema.  rake db:create creates a new database rather than
modifying an existing one.  A migration will modify an existing data
without destroying existing data.

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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to