2014-05-12 15:03:51 -05: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 11:57:40 -05:00
|
|
|
gem_migrations = Metasploit::Credential::Engine.instance.paths['db/migrate'].to_a
|
2016-05-11 14:05:34 -05:00
|
|
|
ActiveRecord::Migrator.migrations_paths += gem_migrations
|
2016-05-11 14:54:40 -05:00
|
|
|
ActiveRecord::Tasks::DatabaseTasks.migrations_paths += gem_migrations
|
2014-05-12 15:03:51 -05:00
|
|
|
end
|
|
|
|
|
end
|