Skip to content

Instantly share code, notes, and snippets.

@oki
Created November 25, 2008 13:20
Show Gist options
  • Save oki/28911 to your computer and use it in GitHub Desktop.
Save oki/28911 to your computer and use it in GitHub Desktop.
class AddImgToPortfolios < ActiveRecord::Migration
def self.up
add_column :portfolios, :img_file_name, :string
add_column :portfolios, :img_content_type, :string
add_column :portfolios, :img_file_size, :integer
add_column :portfolios, :img_updated_at, :datetime
end
def self.down
remove_column :portfolios, :img_file_name
remove_column :portfolios, :img_content_type
remove_column :portfolios, :img_file_size
remove_column :portfolios, :img_updated_at
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment