2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
# 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
|