Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Commit

Permalink
Added indexes for created_at/updated_at timestamps
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh Krall authored and Josh Krall committed Mar 20, 2010
1 parent b4878bf commit 34b89fe
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/funnel_cake/data_store/mongo_mapper/visitor.rb
Expand Up @@ -16,6 +16,8 @@ def self.included(base)
key :state, String
key :ip, String

ensure_index :created_at
ensure_index :updated_at
ensure_index :user_id
ensure_index :key
ensure_index :state
Expand All @@ -26,6 +28,7 @@ def self.included(base)
ensure_index 'events.referer'
ensure_index 'events.user_agent'
ensure_index 'events.url'
ensure_index 'events.created_at'

# Set up the Analytics::Event model association
many :events, :class_name=>FunnelCake.event_class.to_s, :dependent=>:destroy, :foreign_key=>:visitor_id
Expand Down

0 comments on commit 34b89fe

Please sign in to comment.