Class: CreateImages
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- CreateImages
- Defined in:
- lib/generators/uploadbox/image/templates/migrate/create_images.rb
Instance Method Summary collapse
Instance Method Details
#change ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/generators/uploadbox/image/templates/migrate/create_images.rb', line 2 def change create_table :images do |t| t.string :file t.references :imageable, polymorphic: true, index: true t.integer :width t.integer :height t.boolean :retina, default: false t.string :upload_name t.string :secure_random, index: true t.string :original_file t. end end |