Re: Re: remove a table with migration

coolesting
Tue, 23 Aug 2011 14:47:29 -0000

Good idea, if i need to rollback the migration that is not the lately
one, it must be confused to me or rails.
The good way is to create a new migration for rollbacking  with the
related time.

2011/8/23, Colin Law
<clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>:
> On 23 August 2011 08:55, coolesting
<coolesting-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>> Can i rollback the specify table ?
>> for example, the ''db/migrate'' directory have five
migration files, i
>> want to rollback one of them,
>
> It really is not a good idea to do that, better to make a new
> migration.  If you do rollback a migration that is not the last make
> sure you then delete the migration or if you run them from the start
> you will end up with the table back again.  Also if any of the later
> migrations reference that table you will be in trouble if you run the
> migrations from scratch after deleting this one.
>
> 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
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.