cirandas.net

ref: master

db/migrate/20110524151137_remove_public_article_from_article_versions.rb


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
class RemovePublicArticleFromArticleVersions < ActiveRecord::Migration
  def self.up
    remove_column :article_versions, :public_article
  end

  def self.down
    add_column :article_versions, :public_article, :boolean, :default => true
    execute('update article_versions set public_article = (1>0)')
  end
end