Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

`rake db:migrate:reset` isn't grabbing migrations from within an engine #11964

Closed
komidore64 opened this Issue · 2 comments

3 participants

@komidore64

I am using Rails 3.2.13.

The engine is adding itself to the Rails path like this:

initializer "fort.load_app_instance_data" do |app|
  app.config.paths['db/migrate'] += Fort::Engine.paths['db/migrate'].existent
end

The whole file can be viewed here.

I have a bunch of migrations in the base Rails app (located in db/migrate) and then a couple migrations inside of an engine (located in engines/<engine>/db/migrate).

I can:

  1. drop the database (rake db:drop),
  2. create the database (rake db:create),
  3. and then migrate the database (rake db:migrate)

resulting in all the migrations being listed as up when I check the status (rake db:migrate:status). This is the desired result.

The same thing does not occur when I check the status after running rake db:migrate:reset. The migrations located in the engines migrate directory are still listed as down.

The full output can be viewed in this gist.

@beav beav referenced this issue from a commit in beav/katello
@komidore64 komidore64 katello-reset-dbs - db:migrate:reset is acting unexpectedly
It seems that db:migrate:reset is ignoring migrations located in our
engines. I filed a bug against rails [1] to hopefully get it fixed.

[1] rails/rails#11964
6e91561
@komidore64 komidore64 added the stale label
@rafaelfranca
Owner

This issue has been automatically marked as stale because it has not been commented on for at least
three months.

The resources of the Rails team are limited, and so we are asking for your help.

If you can still reproduce this error on the 4-1-stable, 4-0-stable branches or on master,
please reply with all of the information you have about it in order to keep the issue open.

Thank you for all your contributions.

@rails-bot rails-bot closed this
@rails-bot
Collaborator

This issue has been automatically closed because of inactivity.

If you can still reproduce this error on the 4-1-stable, 4-0-stable branches or on master,
please reply with all of the information you have about it in order to keep the issue open.

Thank you for all your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.