diff options
Diffstat (limited to 'db')
| -rw-r--r-- | db/migrate/20150204042612_add_agent_id_to_events.rb | 3 | ||||
| -rw-r--r-- | db/schema.rb | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/db/migrate/20150204042612_add_agent_id_to_events.rb b/db/migrate/20150204042612_add_agent_id_to_events.rb index 40b4125..957473e 100644 --- a/db/migrate/20150204042612_add_agent_id_to_events.rb +++ b/db/migrate/20150204042612_add_agent_id_to_events.rb @@ -1,5 +1,6 @@ class AddAgentIdToEvents < ActiveRecord::Migration def change - add_reference :events, :agent, index: true + add_column :events, :agent_id, :uuid, null: false + add_index :events, :agent_id end end diff --git a/db/schema.rb b/db/schema.rb index 45aa6ea..639dc0e 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -30,12 +30,14 @@ ActiveRecord::Schema.define(version: 20150221192553) do t.datetime "updated_at", null: false end + add_index "dispositions", ["fingerprint"], name: "index_dispositions_on_fingerprint", unique: true, using: :btree + create_table "events", id: :uuid, default: "uuid_generate_v4()", force: :cascade do |t| t.string "type" t.json "data" t.datetime "created_at", null: false t.datetime "updated_at", null: false - t.integer "agent_id" + t.uuid "agent_id", null: false end add_index "events", ["agent_id"], name: "index_events_on_agent_id", using: :btree |
