huginn/db/migrate/20121216025930_create_events.rb

17 lines
403 B
Ruby
Raw Normal View History

2013-03-09 22:32:52 -08:00
class CreateEvents < ActiveRecord::Migration
def change
create_table :events do |t|
t.integer :user_id
t.integer :agent_id
t.decimal :lat, :precision => 15, :scale => 10
t.decimal :lng, :precision => 15, :scale => 10
t.text :payload
t.timestamps
end
add_index :events, [:user_id, :created_at]
add_index :events, [:agent_id, :created_at]
end
end