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