rake db:migrate:redo

I can run rake db:migrate via Tools - Run Rake Task.  However, when I select a specific version from the drop down list in the tool, it still runs rake for the most recent version: i.e. rake db:migrate instead of rake db:migrate:redo VERSION=XXXXXXXXXXXX.

Am I missing something?  I am assuming that the drop list of existing migrations is there so one can rerun a previous migration.

RubyMine version 7.1.4

Thanks!

4 comments
Comment actions Permalink

Bump... this problem also exists under 8.0

0
Comment actions Permalink

Hello Jage,


excuse me for the delay. I've tried to run rake task db:migrate:redo specifying the migration in RubyMine 144.3600, and it used the migration I'd set. What is the output in your console after running this command?

0
Comment actions Permalink

the confusion in my case was that I was trying to enter the parameters (like VERSION=XXXXXXXX) in the first window that appears, but that is only a search window... I wouldn't have thought to just type db:migrate:redo & press enter (as I would be afraid of immediate execute of that command, but that is not the case)

Steps to redo a migration:

  1. Tools | Run Rake Task... (Ctrl+Alt+R)
  2. db:migrate:redo <Press Enter>
  3. Select Version or Step + Environment & Full backtrace option if needed <Click OK>

I see 3 paths to better usability:

  1. Allow arguments to be passed in search window (and parse against template that is used in next window)
  2. Add error text when arguments are entered to indicate that you can't pass arguments in this window
  3. Add text to the "Run Rake Task..." search window to indicate task options are entered on next screen. currently it states:

         Enter task name or its part:

    you could add additional text like:

         Enter task name or its part (Arguments entered in next step):

 

 

0
Comment actions Permalink

@Mstillman, we've implemented a new feature Run Anything, probably it'll meet your needs, please take a look:

https://blog.jetbrains.com/ruby/2018/01/rubymine-2018-1-eap1-is-open/

0

Please sign in to leave a comment.