Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2017
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Rails 0.55 KB | None | 0 0
  1. class AddImeagableToPics < ActiveRecord::Migration
  2.   def self.up
  3.     add_column :pictures, :photo_file_name, :string
  4.     add_column :pictures, :photo_content_type, :string
  5.     add_column :pictures, :photo_file_size, :integer
  6.     add_column :pictures, :polymorphic => true, :imageable
  7.   end
  8.  
  9.   def self.down
  10.     remove_column :pictures, :photo_file_name, :string
  11.     remove_column :pictures, :photo_content_type, :string
  12.     remove_column :pictures, :photo_file_size, :integer
  13.     remove_column :pictures, :polymorphic => true, :imageable
  14.   end
  15. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement