Class: CreatePhotos
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- CreatePhotos
- Defined in:
- lib/generators/templates/create_photos.rb
Class Method Summary collapse
Class Method Details
.down ⇒ Object
19 20 21 |
# File 'lib/generators/templates/create_photos.rb', line 19 def self.down drop_table :photos end |
.up ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/generators/templates/create_photos.rb', line 2 def self.up create_table :photos, :force => true do |t| t.string :photoable_type t.integer :photoable_id t.string :caption t.string :url t.string :image_file_name t.string :image_content_type t.integer :image_file_size t.datetime :image_updated_at t.string :sizes, :limit => 3000 t. t.integer :display_order, :default => 0 end end |