From 4f0b5f8223426644924807fc38f86ec245f4827b Mon Sep 17 00:00:00 2001 From: Jeff Shumate Date: Wed, 22 Feb 2012 20:37:08 -0700 Subject: add popularity counter to blog posts as well as accessor for recent posts --- db/migrate/20120223022021_add_access_count_to_posts.rb | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 db/migrate/20120223022021_add_access_count_to_posts.rb (limited to 'db/migrate') diff --git a/db/migrate/20120223022021_add_access_count_to_posts.rb b/db/migrate/20120223022021_add_access_count_to_posts.rb new file mode 100644 index 0000000..02cd131 --- /dev/null +++ b/db/migrate/20120223022021_add_access_count_to_posts.rb @@ -0,0 +1,8 @@ +class AddAccessCountToPosts < ActiveRecord::Migration + def change + add_column Refinery::Blog::Post.table_name, :access_count, :integer, :default => 0 + + add_index Refinery::Blog::Post.table_name, :access_count + + end +end \ No newline at end of file -- cgit v1.2.3