Commit 75570d3772af7f4333cef8c312902b9457ade4ac

Authored by Antonio Terceiro
1 parent 301c33ea

ActionItem908: zero the hits after adding the field

Showing 1 changed file with 1 additions and 0 deletions   Show diff stats
db/migrate/058_add_hits_to_articles.rb
... ... @@ -2,6 +2,7 @@ class AddHitsToArticles < ActiveRecord::Migration
2 2 def self.up
3 3 add_column :articles, :hits, :integer, :default => 0
4 4 add_column :article_versions, :hits, :integer, :default => 0
  5 + execute('update articles set hits = 0')
5 6 end
6 7  
7 8 def self.down
... ...