Class: AddHasMagickTitle

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/generators/templates/add_has_magick_title.rb

Class Method Summary collapse

Class Method Details

.downObject



13
14
15
# File 'lib/generators/templates/add_has_magick_title.rb', line 13

def self.down
  drop_table :image_titles
end

.upObject



2
3
4
5
6
7
8
9
10
11
# File 'lib/generators/templates/add_has_magick_title.rb', line 2

def self.up
  create_table :image_titles do |t|
    t.references :imagable, :polymorphic => true
    t.string     :text
    t.string     :filename
    t.integer    :width
    t.integer    :height
    t.integer    :size
  end
end