mirror of
https://github.com/Fishwaldo/huginn.git
synced 2025-03-17 20:31:33 +00:00
17 lines
403 B
Ruby
17 lines
403 B
Ruby
|
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
|