diff --git a/core/main/ar-migrations/001_create_command_modules.rb b/core/main/ar-migrations/001_create_command_modules.rb new file mode 100644 index 000000000..d43259b89 --- /dev/null +++ b/core/main/ar-migrations/001_create_command_modules.rb @@ -0,0 +1,12 @@ +class CreateCommandModules < ActiveRecord::Migration[6.0] + + def change + + create_table :command_modules do |t| + t.text :name + t.text :path + end + + end + +end diff --git a/core/main/ar-migrations/002_create_hooked_browsers.rb b/core/main/ar-migrations/002_create_hooked_browsers.rb new file mode 100644 index 000000000..c1e932888 --- /dev/null +++ b/core/main/ar-migrations/002_create_hooked_browsers.rb @@ -0,0 +1,19 @@ +class CreateHookedBrowsers < ActiveRecord::Migration[6.0] + + def change + + create_table :hooked_browsers do |t| + t.text :session + t.text :ip + t.text :firstseen + t.text :lastseen + t.text :httpheaders + t.text :domain + t.integer :port + t.integer :count + t.boolean :is_proxy + end + + end + +end diff --git a/core/main/ar-migrations/003_create_logs.rb b/core/main/ar-migrations/003_create_logs.rb new file mode 100644 index 000000000..e3614718a --- /dev/null +++ b/core/main/ar-migrations/003_create_logs.rb @@ -0,0 +1,14 @@ +class CreateLogs < ActiveRecord::Migration[6.0] + + def change + + create_table :logs do |t| + t.text :logtype + t.text :event + t.datetime :date + t.references :hooked_browser + end + + end + +end diff --git a/core/main/ar-migrations/004_create_commands.rb b/core/main/ar-migrations/004_create_commands.rb new file mode 100644 index 000000000..c56d72be0 --- /dev/null +++ b/core/main/ar-migrations/004_create_commands.rb @@ -0,0 +1,14 @@ +class CreateCommands < ActiveRecord::Migration[6.0] + + def change + + create_table :commands do |t| + t.text :data + t.datetime :creationdate + t.text :label + t.boolean :instructions_sent + end + + end + +end diff --git a/core/main/ar-migrations/005_create_results.rb b/core/main/ar-migrations/005_create_results.rb new file mode 100644 index 000000000..9a1265dce --- /dev/null +++ b/core/main/ar-migrations/005_create_results.rb @@ -0,0 +1,13 @@ +class CreateResults < ActiveRecord::Migration[6.0] + + def change + + create_table :results do |t| + t.datetime :date + t.integer :status + t.text :data + end + + end + +end diff --git a/core/main/ar-migrations/006_create_option_caches.rb b/core/main/ar-migrations/006_create_option_caches.rb new file mode 100644 index 000000000..6f605663a --- /dev/null +++ b/core/main/ar-migrations/006_create_option_caches.rb @@ -0,0 +1,12 @@ +class CreateOptionCaches < ActiveRecord::Migration[6.0] + + def change + + create_table :option_caches do |t| + t.text :name + t.text :value + end + + end + +end diff --git a/core/main/ar-migrations/007_create_browser_details.rb b/core/main/ar-migrations/007_create_browser_details.rb new file mode 100644 index 000000000..5404453d2 --- /dev/null +++ b/core/main/ar-migrations/007_create_browser_details.rb @@ -0,0 +1,13 @@ +class CreateBrowserDetails < ActiveRecord::Migration[6.0] + + def change + + create_table :browser_details do |t| + t.text :session_id + t.text :detail_key + t.text :detail_value + end + + end + +end