Skip to content

Commit 0ddc6b3

Browse files
committed
Document Msf::DBManager#initialize_metasploit_data_models
1 parent c9a162a commit 0ddc6b3

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

lib/msf/core/db_manager.rb

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -80,17 +80,6 @@ def initialize(framework, opts = {})
8080
initialize_database_support
8181
end
8282

83-
def initialize_metasploit_data_models
84-
# Provide access to ActiveRecord models shared w/ commercial versions
85-
require "metasploit_data_models"
86-
87-
metasploit_data_model_migrations_pathname = MetasploitDataModels.root.join(
88-
'db',
89-
'migrate'
90-
)
91-
ActiveRecord::Migrator.migrations_paths << metasploit_data_model_migrations_pathname.to_s
92-
end
93-
9483
#
9584
# Do what is necessary to load our database support
9685
#
@@ -166,6 +155,20 @@ def initialize_drivers
166155
$KCODE = 'NONE' if RUBY_VERSION =~ /^1\.8\./
167156
end
168157

158+
# Loads Metasploit Data Models and adds its migrations to migrations paths.
159+
#
160+
# @return [void]
161+
def initialize_metasploit_data_models
162+
# Provide access to ActiveRecord models shared w/ commercial versions
163+
require "metasploit_data_models"
164+
165+
metasploit_data_model_migrations_pathname = MetasploitDataModels.root.join(
166+
'db',
167+
'migrate'
168+
)
169+
ActiveRecord::Migrator.migrations_paths << metasploit_data_model_migrations_pathname.to_s
170+
end
171+
169172
#
170173
# Create a new database sink and initialize it
171174
#

0 commit comments

Comments
 (0)