thanks for reply On Sat, Sep 8, 2012 at 9:55 AM, Javier Quarite <[email protected]> wrote:
> Rails is smart enough to determine if you want to create or drop a table > if you have done the migration with change > def change > #code here > end > > it only depends on how you write the commands > if you do > rake db:migrate > then it will create the db (if the code inside change is about it) and if > you do > rake db:rollback > it will drop that table > in other case then > > def up > #create table here > end > > def down > #drop table here > end > > take a look here > http://guides.rubyonrails.org/migrations.html > and then here > > http://stackoverflow.com/questions/10365129/rails-migrations-self-up-and-self-down-versus-change > > http://stackoverflow.com/questions/7600415/rails-3-generate-migration-no-up-or-down-method > there is a lot more on google > > JavierQ > > -- > 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 https://groups.google.com/groups/opt_out. > > > -- 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 https://groups.google.com/groups/opt_out.

