2014-05-12 20:03:51 +00:00
|
|
|
namespace :db do
|
|
|
|
# Add onto the task so that after adding Rails.application.paths['db/migrate']
|
|
|
|
task :load_config do
|
|
|
|
# It's important to call to_a or the paths will just be relative and not realpaths
|
2016-05-06 16:57:40 +00:00
|
|
|
gem_migrations = Metasploit::Credential::Engine.instance.paths['db/migrate'].to_a
|
2016-05-11 19:05:34 +00:00
|
|
|
ActiveRecord::Migrator.migrations_paths += gem_migrations
|
2016-05-11 19:54:40 +00:00
|
|
|
ActiveRecord::Tasks::DatabaseTasks.migrations_paths += gem_migrations
|
2014-05-12 20:03:51 +00:00
|
|
|
end
|
|
|
|
end
|