ref: master
db/migrate/029_add_advertise_to_article.rb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
class AddAdvertiseToArticle < ActiveRecord::Migration def self.up # show in recent content? add_column :articles, :advertise, :boolean, :default => true # add this column by hand while acts_as_versioned dont have a method for update versioned table add_column :article_versions, :advertise, :boolean, :default => true end def self.down remove_column :articles, :advertise # remove this column by hand while acts_as_versioned dont have a method for downdate versioned table remove_column :article_versions, :advertise end end |