From fe0dc8161a05b3168646d2958d4732e9a7d61c90 Mon Sep 17 00:00:00 2001 From: Erik Ordway Date: Mon, 21 Oct 2013 09:28:35 -0700 Subject: [PATCH] Update 20131017014509_add_post_count_to_categories.rb In case the category does not have any posts yet. You get a null value error running the migration if this is the case. --- db/migrate/20131017014509_add_post_count_to_categories.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/migrate/20131017014509_add_post_count_to_categories.rb b/db/migrate/20131017014509_add_post_count_to_categories.rb index 34773c24a1e..809eb65e89e 100644 --- a/db/migrate/20131017014509_add_post_count_to_categories.rb +++ b/db/migrate/20131017014509_add_post_count_to_categories.rb @@ -3,7 +3,7 @@ class AddPostCountToCategories < ActiveRecord::Migration add_column :categories, :post_count, :integer, null: false, default: 0 execute <