Re: remove a table with migration

Lionel
Tue, 23 Aug 2011 07:01:28 -0000

you have to create a migration like this :

rails g migration deleteTableTableName

- open the file generated and in the ''up'' method you should
enter this :
  def up
    drop_table :table_name
  end

- close the file en run
  rake db:migrate

And that''s all  :)

Good luck









Le 23 août 2011 à 03:27, coolesting a écrit :

> HI, guys,
> How to remove a table with migration, i saw a drop down method in
> migration created file , how can i use that ?
>
> thank you.
>
> --
> 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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com.
> 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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com.