Add gem ahoy_matey and some dependencies

This commit is contained in:
Eloy Gomez
2015-08-08 12:05:55 +02:00
parent 90a3dcdc16
commit aaeb77d969
8 changed files with 163 additions and 7 deletions

View File

@@ -0,0 +1,20 @@
class CreateAhoyEvents < ActiveRecord::Migration
def change
create_table :ahoy_events, id: false do |t|
t.uuid :id, default: nil, primary_key: true
t.uuid :visit_id, default: nil
# user
t.integer :user_id
# add t.string :user_type if polymorphic
t.string :name
t.jsonb :properties
t.timestamp :time
end
add_index :ahoy_events, [:visit_id]
add_index :ahoy_events, [:user_id]
add_index :ahoy_events, [:time]
end
end