Commit 7c877fc3db601682c29100416e81700314d408de

Authored by MoisesMachado
1 parent 4ff082f3

ActionItem147: updated accept_comments column for existing articles

git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@2443 3f533792-8f58-4932-b0fe-aaf55b0a4547
db/migrate/053_add_accept_comments_to_articles.rb
1 1 class AddAcceptCommentsToArticles < ActiveRecord::Migration
2 2 def self.up
3 3 add_column :articles, :accept_comments, :boolean, :default => true
  4 + execute 'update articles set accept_comments = (1>0)'
4 5 add_column :article_versions, :accept_comments, :boolean, :default => true
  6 + execute 'update article_versions set accept_comments = (1>0)'
5 7 end
6 8  
7 9 def self.down
... ...