1
0

20121216025930_create_events.rb 403 B

12345678910111213141516
  1. class CreateEvents < ActiveRecord::Migration
  2. def change
  3. create_table :events do |t|
  4. t.integer :user_id
  5. t.integer :agent_id
  6. t.decimal :lat, :precision => 15, :scale => 10
  7. t.decimal :lng, :precision => 15, :scale => 10
  8. t.text :payload
  9. t.timestamps
  10. end
  11. add_index :events, [:user_id, :created_at]
  12. add_index :events, [:agent_id, :created_at]
  13. end
  14. end