Rake db:migrate:redo

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

I dont get that. I run down and then up.

i havent seen that happen before either…

sorry for the pesimism :slight_smile: but i just cant think what is wrong with
your rakes…

On Jul 4, 7:16 am, Oliver S. [email protected]

i have the same problem! if you find out a solution let me know!

On Jul 4, 8:16 am, Oliver S. [email protected]

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?

Oliver S. 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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs