Sha256: a7649241bd8ab3cb0f55c296bf4ee33453ed0947da35772ee242bdcd4e050dc9
Contents?: true
Size: 818 Bytes
Versions: 19
Compression:
Stored size: 818 Bytes
Contents
class CreatePolygalleriesIfNecessary < ActiveRecord::Migration def up unless ActiveRecord::Base.connection.table_exists? 'polygallery_galleries' 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 end unless ActiveRecord::Base.connection.table_exists? 'polygallery_photos' 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 end def down drop_table :polygallery_galleries drop_table :polygallery_photos end end
Version data entries
19 entries across 19 versions & 1 rubygems