Sha256: 3bf460db7780845dd50e3248f30b2a661dc2642bd6c608494840a99c97dd0758

Contents?: true

Size: 432 Bytes

Versions: 10

Compression:

Stored size: 432 Bytes

Contents

class <%= migration_class_name %> < ActiveRecord::Migration
  def change
    create_table :ahoy_events do |t|
      # visit
      t.references :visit

      # user
      t.integer :user_id
      t.string :user_type

      t.string :name
      t.text :properties
      t.timestamp :time
    end

    add_index :ahoy_events, [:visit_id]
    add_index :ahoy_events, [:user_id, :user_type]
    add_index :ahoy_events, [:time]
  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
ahoy_matey-0.3.2 lib/generators/ahoy/events/templates/create_events.rb
ahoy_matey-0.3.1 lib/generators/ahoy/events/templates/create_events.rb
ahoy_matey-0.3.0 lib/generators/ahoy/events/templates/create_events.rb
ahoy_matey-0.2.2 lib/generators/ahoy/events/templates/create_events.rb
ahoy_matey-0.2.1 lib/generators/ahoy/events/templates/create_events.rb
ahoy_matey-0.2.0 lib/generators/ahoy/events/templates/create_events.rb
ahoy_events-0.1.1 lib/generators/ahoy_events/templates/create_events.rb
ahoy_events-0.1.0 lib/generators/ahoy_events/templates/create_events.rb
ahoy_events-0.0.2 lib/generators/ahoy_events/templates/create_events.rb
ahoy_events-0.0.1 lib/generators/ahoy_events/templates/create_events.rb