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-04-19 19:46:05 +00:00
|
|
|
gem_migrations = MetasploitDataModels::Engine.instance.paths['db/migrate'].to_a + Metasploit::Credential::Engine.instance.paths['db/migrate'].to_a
|
2016-04-19 20:00:55 +00:00
|
|
|
#ActiveRecord::Migrator.migrations_paths += gem_migrations
|
2016-04-19 19:46:05 +00:00
|
|
|
ActiveRecord::Tasks::DatabaseTasks.migrations_paths += gem_migrations
|
2014-05-12 20:03:51 +00:00
|
|
|
end
|
|
|
|
end
|