Thanks colin, the tutorail is very helpful to me. 2011/8/20 Colin Law <[email protected]>
> On 20 August 2011 15:53, coolesting <[email protected]> wrote: > > Hi, guys > > > > I fix the db/schema.rb file, and want to update the database using it . > > How i should do. i try 'rake db:migrate' but it not works. > > You should not manually change schema.rb, you should instead write a > migration to change the database design. Running the migration will > update schema.rb. > > See the Rails Guide on Migrations for how to do this. > > In order to put schema.rb back to what it should be before running the > migrations you can do > rake db:schema:dump > You can alternatively just revert schema.rb using your Version Control > System. If you are not using a VCS then start doing so immediately, > you will not regret it. I prefer git. > > I assume you are just getting started with Rails so have a look at all > the Rails Guides and work through some tutorials. Make sure you are > using Rails 3 and that the tutorial is for this version. > railstutorial.org is good and is free to use online. > > Colin > > 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. > > -- 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.

