1
2
3
4
5
6
7
8
9
10
|
class RemovePublicArticle < ActiveRecord::Migration
def self.up
remove_column :articles, :public_article
end
def self.down
add_column :articles, :public_article, :boolean, :default => true
execute('update articles set public_article = (1>0)')
end
end
|