class CreatePolygalleries
Public Instance Methods
change()
click to toggle source
# File lib/generators/polygallery/install/templates/polygallery_migration.rb, line 2 def change create_table :polygallery_galleries do |t| t.string :title, :default => 'gallery' t.integer :default_photo_id t.integer :galleryable_id t.string :galleryable_type t.string :class_name t.timestamps end create_table :polygallery_photos do |t| t.integer :gallery_id t.attachment :photo t.string :title t.text :caption t.string :class_name t.timestamps end end