diff options
| author | mo khan <mo@mokhan.ca> | 2015-02-09 19:43:03 -0700 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2015-02-09 19:43:03 -0700 |
| commit | 594d37bb40f3e3e0f15553383cf2a305d4d6742e (patch) | |
| tree | 6236972f334d3ad778fbd51948d9635ae1226936 /db | |
| parent | 72a1483c8f546fae6c93dcdf91cfd47c37bc2f90 (diff) | |
extract api.
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 d62cc41..2621851 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -30,12 +30,14 @@ ActiveRecord::Schema.define(version: 20150207194524) 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 |
