rake --describe db:migrate:redo says:
Rollbacks the database one migration and re migrate up. If you want
to rollback more than one step, define STEP=x
Presumably that means, it runs #down and then #up. But I''ve put calls
to
Kernel#puts in both methods and it''s running #up first, resulting in
"Mysql::Error: Table ''posts'' already exists:".
So I tried running these:
rake db:drop:all
rake db:create:all
rake db:migrate
rake db:migrate:redo
And it still does exactly the same thing!
It''s not a major issue, I can certainly work round it but this just
seems weird. I''d like to know what''s going on. Rails version:
2.1.0
--
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
I dont get that. I run down and then up. i havent seen that happen before either.. sorry for the pesimism :-) but i just cant think what is wrong with your rakes.. On Jul 4, 7:16 am, Oliver Saunders <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> rake --describe db:migrate:redo says: > > Rollbacks the database one migration and re migrate up. If you want > to rollback more than one step, define STEP=x > > Presumably that means, it runs #down and then #up. But I''ve put calls to > Kernel#puts in both methods and it''s running #up first, resulting in > "Mysql::Error: Table ''posts'' already exists:". > > So I tried running these: > rake db:drop:all > rake db:create:all > rake db:migrate > rake db:migrate:redo > > And it still does exactly the same thing! > > It''s not a major issue, I can certainly work round it but this just > seems weird. I''d like to know what''s going on. Rails version: 2.1.0 > -- > Posted viahttp://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-/JYPxA39Uh5TLH3MbocFFw@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 -~----------~----~----~----~------~----~------~--~---
i have the same problem! if you find out a solution let me know! On Jul 4, 8:16 am, Oliver Saunders <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> rake --describe db:migrate:redo says: > > Rollbacks the database one migration and re migrate up. If you want > to rollback more than one step, define STEP=x > > Presumably that means, it runs #down and then #up. But I''ve put calls to > Kernel#puts in both methods and it''s running #up first, resulting in > "Mysql::Error: Table ''posts'' already exists:". > > So I tried running these: > rake db:drop:all > rake db:create:all > rake db:migrate > rake db:migrate:redo > > And it still does exactly the same thing! > > It''s not a major issue, I can certainly work round it but this just > seems weird. I''d like to know what''s going on. Rails version: 2.1.0 > -- > Posted viahttp://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-/JYPxA39Uh5TLH3MbocFFw@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 -~----------~----~----~----~------~----~------~--~---
Bardo wrote:> i have the same problem! if you find out a solution let me know!Do you by any chance have only a single migration? -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Oliver Saunders wrote:> Bardo wrote: >> i have the same problem! if you find out a solution let me know! > > Do you by any chance have only a single migration?Ahh try: gem update --system -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---