class ChangePhotoFromAttachmentFuToPaperclip < ActiveRecord::Migration def self.up #Reorganise the actual photos on AWS to suit the RWS/Paperclip schema #Rename attachement_fu columns to paperclip convention rename_column :photos, :filename, :photo_file_name rename_column :photos, :content_type, :photo_content_type rename_column :photos, :size, :photo_file_size #Remove non-paperclip columns remove_column :photos, :width remove_column :photos, :height remove_column :photos, :thumbnail #Remove all child records (attachment_fu) Photo.delete_all('parent_id is not null') remove_column :photos, :parent_id end end