From cf24fb7930620f52de948d4a170b71ab34c6a12a Mon Sep 17 00:00:00 2001 From: Daniela Soares Feitosa Date: Tue, 28 Feb 2012 12:49:21 -0300 Subject: [PATCH] Added new migration --- db/migrate/20111211233957_add_comment_count_to_action_tracker.rb | 2 +- db/migrate/20120228154642_add_visibility_to_action_tracker.rb | 9 +++++++++ test/unit/comment_test.rb | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20120228154642_add_visibility_to_action_tracker.rb diff --git a/db/migrate/20111211233957_add_comment_count_to_action_tracker.rb b/db/migrate/20111211233957_add_comment_count_to_action_tracker.rb index 80b68c8..67ee22a 100644 --- a/db/migrate/20111211233957_add_comment_count_to_action_tracker.rb +++ b/db/migrate/20111211233957_add_comment_count_to_action_tracker.rb @@ -4,6 +4,6 @@ class AddCommentCountToActionTracker < ActiveRecord::Migration end def self.down - remove_column :action_tracker, :comments_count, :integer, :default => 0 + remove_column :action_tracker, :comments_count, :integer end end diff --git a/db/migrate/20120228154642_add_visibility_to_action_tracker.rb b/db/migrate/20120228154642_add_visibility_to_action_tracker.rb new file mode 100644 index 0000000..ce87899 --- /dev/null +++ b/db/migrate/20120228154642_add_visibility_to_action_tracker.rb @@ -0,0 +1,9 @@ +class AddVisibilityToActionTracker < ActiveRecord::Migration + def self.up + add_column :action_tracker, :visible, :boolean, :default => true + end + + def self.down + remove_column :action_tracker, :visible, :boolean + end +end diff --git a/test/unit/comment_test.rb b/test/unit/comment_test.rb index d7ff6b2..3e33172 100644 --- a/test/unit/comment_test.rb +++ b/test/unit/comment_test.rb @@ -331,4 +331,5 @@ class CommentTest < ActiveSupport::TestCase should 'update article activity when add a comment' should 'update activity when add a comment' + should 'create a new activity when add a comment and the activity was removed' end -- libgit2 0.21.2