Patch #11299

redmine:plugins:migrate should update db/schema.rb

Added by Jean-Baptiste Barth over 9 years ago. Updated about 9 years ago.

Status:ClosedStart date:
Priority:LowDue date:
Assignee:Jean-Baptiste Barth% Done:


Target version:2.0.4


I don't know if it's actually a defect or if it's intentional, but redmine:plugins:migrate task doesn't invoke db:schema:dump, hence it does not update the db/schema.rb file. It causes at least unintuitive behaviour when cloning the database structure or when testing plugins for instance, as the test task invokes active_record's db:schema:load and it might not be up to date.

Any opinion about this ? Can someone think about this as intentional and why ? If not I can commit this later.

redmine_plugins_migrate.patch Magnifier (400 Bytes) Jean-Baptiste Barth, 2012-07-01 22:00

Associated revisions

Revision 10134
Added by Jean-Baptiste Barth over 9 years ago

Invoke db:schema:dump after plugin migrations so that db/schema.rb stays up-to-date


#1 Updated by Nitish Upreti over 9 years ago

Even I just noticed it, This should be fixed ASAP.
@Jean Any idea how to make a clone of development database into your test database with all migrations already running and schema dump being inaccurate?

#2 Updated by Jean-Baptiste Barth over 9 years ago

You can manually trigger a db:schema:dump:

RAILS_ENV=development rake db:schema:dump
RAILS_ENV=test rake db:reset db:schema:load

#3 Updated by Jean-Baptiste Barth over 9 years ago

  • Status changed from New to Resolved
  • Assignee set to Jean-Baptiste Barth
  • Target version set to Candidate for next minor release

Added in r10134 (sorry I forgot the id of the ticket :/).

Jean-Philippe, Toshi, or Etienne: I let you merge that in a stable branch when you think it's appropriate.

#4 Updated by Jean-Philippe Lang over 9 years ago

  • Target version changed from Candidate for next minor release to 2.0.4

#5 Updated by Jean-Philippe Lang about 9 years ago

  • Status changed from Resolved to Closed

Merged in 2.0-stable.

Also available in: Atom PDF