cirandas.net

ref: master

db/migrate/20131011172930_add_image_to_article.rb


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
class AddImageToArticle < ActiveRecord::Migration

  def self.up
    add_column :articles, :image_id, :integer
    add_column :article_versions, :image_id, :integer
  end

  def self.down
    remove_column :articles, :image_id
    remove_column :article_versions, :image_id
  end

end