Revision afd5e512
Added by Ivan Necas over 7 years ago
lib/tasks/plugins.rake | ||
---|---|---|
end
|
||
end
|
||
end
|
||
|
||
task :refresh_migrations => :environment do
|
||
# when calling `rake db:create db:migrate` the migrations_paths
|
||
# get loaded before environment, and are not refreshed later. This
|
||
# iterates over the list of migration dires and ensures they are still there.
|
||
ActiveRecord::Tasks::DatabaseTasks.migrations_paths.clear
|
||
Rails.application.config.paths['db/migrate'].each do |path|
|
||
ActiveRecord::Tasks::DatabaseTasks.migrations_paths << path
|
||
end
|
||
end
|
||
end
|
||
|
||
Rake::Task["db:migrate"].enhance ['plugin:refresh_migrations']
|
Also available in: Unified diff
Fixes #17361 - ensure plugins migration paths are set