still trying to fix these migrations

seeing odd behaviour with mgirations in
rspec
bug/bundler_fix
David Maloney 2016-05-11 14:54:40 -05:00
parent 4c2fed37f9
commit 7edaa2abcc
No known key found for this signature in database
GPG Key ID: DEDBA9DC3A913DB2
2 changed files with 119 additions and 1 deletions

View File

@ -79,6 +79,16 @@ ActiveRecord::Schema.define(version: 20160415153312) do
t.datetime "updated_at"
end
create_table "credential_cores_tasks", id: false, force: :cascade do |t|
t.integer "core_id"
t.integer "task_id"
end
create_table "credential_logins_tasks", id: false, force: :cascade do |t|
t.integer "login_id"
t.integer "task_id"
end
create_table "creds", force: :cascade do |t|
t.integer "service_id", null: false
t.datetime "created_at", null: false
@ -222,6 +232,114 @@ ActiveRecord::Schema.define(version: 20160415153312) do
t.binary "prefs"
end
create_table "metasploit_credential_cores", force: :cascade do |t|
t.integer "origin_id", null: false
t.string "origin_type", null: false
t.integer "private_id"
t.integer "public_id"
t.integer "realm_id"
t.integer "workspace_id", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.integer "logins_count", default: 0
end
add_index "metasploit_credential_cores", ["origin_type", "origin_id"], name: "index_metasploit_credential_cores_on_origin_type_and_origin_id", using: :btree
add_index "metasploit_credential_cores", ["private_id"], name: "index_metasploit_credential_cores_on_private_id", using: :btree
add_index "metasploit_credential_cores", ["public_id"], name: "index_metasploit_credential_cores_on_public_id", using: :btree
add_index "metasploit_credential_cores", ["realm_id"], name: "index_metasploit_credential_cores_on_realm_id", using: :btree
add_index "metasploit_credential_cores", ["workspace_id", "private_id"], name: "unique_private_metasploit_credential_cores", unique: true, where: "(((realm_id IS NULL) AND (public_id IS NULL)) AND (private_id IS NOT NULL))", using: :btree
add_index "metasploit_credential_cores", ["workspace_id", "public_id", "private_id"], name: "unique_realmless_metasploit_credential_cores", unique: true, where: "(((realm_id IS NULL) AND (public_id IS NOT NULL)) AND (private_id IS NOT NULL))", using: :btree
add_index "metasploit_credential_cores", ["workspace_id", "public_id"], name: "unique_public_metasploit_credential_cores", unique: true, where: "(((realm_id IS NULL) AND (public_id IS NOT NULL)) AND (private_id IS NULL))", using: :btree
add_index "metasploit_credential_cores", ["workspace_id", "realm_id", "private_id"], name: "unique_publicless_metasploit_credential_cores", unique: true, where: "(((realm_id IS NOT NULL) AND (public_id IS NULL)) AND (private_id IS NOT NULL))", using: :btree
add_index "metasploit_credential_cores", ["workspace_id", "realm_id", "public_id", "private_id"], name: "unique_complete_metasploit_credential_cores", unique: true, where: "(((realm_id IS NOT NULL) AND (public_id IS NOT NULL)) AND (private_id IS NOT NULL))", using: :btree
add_index "metasploit_credential_cores", ["workspace_id", "realm_id", "public_id"], name: "unique_privateless_metasploit_credential_cores", unique: true, where: "(((realm_id IS NOT NULL) AND (public_id IS NOT NULL)) AND (private_id IS NULL))", using: :btree
add_index "metasploit_credential_cores", ["workspace_id"], name: "index_metasploit_credential_cores_on_workspace_id", using: :btree
create_table "metasploit_credential_logins", force: :cascade do |t|
t.integer "core_id", null: false
t.integer "service_id", null: false
t.string "access_level"
t.string "status", null: false
t.datetime "last_attempted_at"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
add_index "metasploit_credential_logins", ["core_id", "service_id"], name: "index_metasploit_credential_logins_on_core_id_and_service_id", unique: true, using: :btree
add_index "metasploit_credential_logins", ["service_id", "core_id"], name: "index_metasploit_credential_logins_on_service_id_and_core_id", unique: true, using: :btree
create_table "metasploit_credential_origin_cracked_passwords", force: :cascade do |t|
t.integer "metasploit_credential_core_id", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
add_index "metasploit_credential_origin_cracked_passwords", ["metasploit_credential_core_id"], name: "originating_credential_cores", using: :btree
create_table "metasploit_credential_origin_imports", force: :cascade do |t|
t.text "filename", null: false
t.integer "task_id"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
add_index "metasploit_credential_origin_imports", ["task_id"], name: "index_metasploit_credential_origin_imports_on_task_id", using: :btree
create_table "metasploit_credential_origin_manuals", force: :cascade do |t|
t.integer "user_id", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
add_index "metasploit_credential_origin_manuals", ["user_id"], name: "index_metasploit_credential_origin_manuals_on_user_id", using: :btree
create_table "metasploit_credential_origin_services", force: :cascade do |t|
t.integer "service_id", null: false
t.text "module_full_name", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
add_index "metasploit_credential_origin_services", ["service_id", "module_full_name"], name: "unique_metasploit_credential_origin_services", unique: true, using: :btree
create_table "metasploit_credential_origin_sessions", force: :cascade do |t|
t.text "post_reference_name", null: false
t.integer "session_id", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
add_index "metasploit_credential_origin_sessions", ["session_id", "post_reference_name"], name: "unique_metasploit_credential_origin_sessions", unique: true, using: :btree
create_table "metasploit_credential_privates", force: :cascade do |t|
t.string "type", null: false
t.text "data", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.string "jtr_format"
end
add_index "metasploit_credential_privates", ["type", "data"], name: "index_metasploit_credential_privates_on_type_and_data", unique: true, using: :btree
create_table "metasploit_credential_publics", force: :cascade do |t|
t.string "username", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.string "type", null: false
end
add_index "metasploit_credential_publics", ["username"], name: "index_metasploit_credential_publics_on_username", unique: true, using: :btree
create_table "metasploit_credential_realms", force: :cascade do |t|
t.string "key", null: false
t.string "value", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
add_index "metasploit_credential_realms", ["key", "value"], name: "index_metasploit_credential_realms_on_key_and_value", unique: true, using: :btree
create_table "mod_refs", force: :cascade do |t|
t.string "module", limit: 1024
t.string "mtype", limit: 128

View File

@ -4,6 +4,6 @@ namespace :db do
# It's important to call to_a or the paths will just be relative and not realpaths
gem_migrations = Metasploit::Credential::Engine.instance.paths['db/migrate'].to_a
ActiveRecord::Migrator.migrations_paths += gem_migrations
#ActiveRecord::Tasks::DatabaseTasks.migrations_paths += gem_migrations
ActiveRecord::Tasks::DatabaseTasks.migrations_paths += gem_migrations
end
end