Re: Re: remove a table with migration

coolesting
Tue, 23 Aug 2011 07:55:59 -0000

Can i rollback the specify table ?
for example, the ''db/migrate'' directory have five migration
files, i
want to rollback one of them,
if i use this command "rake db:migrate" that will rollback the lastly
table.

2011/8/23, Colin Law
<clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>:
> On 23 August 2011 08:11, coolesting
<coolesting-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>> I just use the self.down method of origin migration that creates the
>> table to drop down the table
>
> What do you mean by using the self.down method?
>
>> but the command ''rake db:migrate'' not works.
>
> Did you create a new migration with the drop table in as described by
> Lionel or are you just trying to rollback the previous migration?
>
> Colin
>
>>
>> 2011/8/23, coolesting
<coolesting-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:
>>> How to rollback specify table?
>>>
>>> 2011/8/22, 7stud --
<lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org>:
>>>> In rails 3.0.9:
>>>>
>>>> bundle exec rake db:rollback
>>>>
>>>> --
>>>> Posted via http://www.ruby-forum.com/.
>>>>
>>>> --
>>>> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>>>> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.