Browse files

Db index

  • Loading branch information...
1 parent b695159 commit d0b8dd6b44bd9fc936dbc0c77850c95c72debf5f @suttree committed Feb 9, 2012
Showing with 9 additions and 0 deletions.
  1. +9 −0 db/migrate/20120209125852_index_articles_created_on.rb
View
9 db/migrate/20120209125852_index_articles_created_on.rb
@@ -0,0 +1,9 @@
+class IndexArticlesCreatedOn < ActiveRecord::Migration
+ def self.up
+ add_index :articles, :created_at
+ end
+
+ def self.down
+ remove_index :articles, :created_at
+ end
+end

0 comments on commit d0b8dd6

Please sign in to comment.