Browse files

add indices

  • Loading branch information...
1 parent 7c3fb56 commit 6fe5286c468f3d3a8e944d46ce9611637a7b035d @harley committed Mar 12, 2012
Showing with 6 additions and 0 deletions.
  1. +6 −0 generators/auditable/templates/migration.rb
View
6 generators/auditable/templates/migration.rb
@@ -8,5 +8,11 @@ def change
t.string :tag
t.timestamps
end
+
+ add_index :audits, [:auditable_id, :auditable_type], :name => 'auditable_index'
+ add_index :audits, [:user_id, :user_type], :name => 'user_index'
+ add_index :audits, :created_at
+ add_index :audits, :action
+ add_index :audits, :tag
end
end

0 comments on commit 6fe5286

Please sign in to comment.