From a0be5a27d2f266eb3f96a7b5a63e25f7bf38b2c1 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Tue, 3 Nov 2015 15:37:21 -0500 Subject: [PATCH] Fix migration so it doesn't break things! --- db/migrate/20151103193404_add_links_counter_cache_to_cards.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/db/migrate/20151103193404_add_links_counter_cache_to_cards.rb b/db/migrate/20151103193404_add_links_counter_cache_to_cards.rb index db716bb..fde53c7 100644 --- a/db/migrate/20151103193404_add_links_counter_cache_to_cards.rb +++ b/db/migrate/20151103193404_add_links_counter_cache_to_cards.rb @@ -2,6 +2,7 @@ class AddLinksCounterCacheToCards < ActiveRecord::Migration def up add_column :cards, :links_count, :integer, default: 0, null: false + PaperTrail.whodunnit = 1 Card.reset_column_information Card.find_each do |card| card.update_attribute(:links_count, card.links.count)