aboutsummaryrefslogtreecommitdiffstats
path: root/db/migrate
diff options
context:
space:
mode:
authorJeff Shumate <jeff@catapulsion.net>2012-02-22 20:37:08 -0700
committerJeff Shumate <jeff@catapulsion.net>2012-02-22 20:37:08 -0700
commit4f0b5f8223426644924807fc38f86ec245f4827b (patch)
tree28f4f4f2e59ea65e6c68adf416fa8220e1404a01 /db/migrate
parent45cad84f4986ec9a1d78a5ced1a842f7a9048b5d (diff)
downloadrefinerycms-blog-4f0b5f8223426644924807fc38f86ec245f4827b.tar.gz
refinerycms-blog-4f0b5f8223426644924807fc38f86ec245f4827b.tar.bz2
refinerycms-blog-4f0b5f8223426644924807fc38f86ec245f4827b.zip
add popularity counter to blog posts as well as accessor for recent posts
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/20120223022021_add_access_count_to_posts.rb8
1 files changed, 8 insertions, 0 deletions
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