- `Rails.root` is a `Pathname`, so let's use `Rails.root.join` - Clean up most of the remaining `File.join`s
14 lines
437 B
Ruby
14 lines
437 B
Ruby
require Rails.root.join('db', 'migrate', '20110319005509_add_processed_to_post')
|
|
class UnprocessedImageUploader < ActiveRecord::Migration
|
|
def self.up
|
|
AddProcessedToPost.down
|
|
rename_column :posts, :image, :processed_image
|
|
add_column :posts, :unprocessed_image, :string
|
|
end
|
|
|
|
def self.down
|
|
remove_column :posts, :unprocessed_image
|
|
rename_column :posts, :processed_image, :image
|
|
AddProcessedToPost.up
|
|
end
|
|
end
|