Class: CreateProductImages

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/forge/db/migrate/20130405172032_create_product_images.rb

Instance Method Summary collapse

Instance Method Details

#downObject



17
18
19
# File 'lib/forge/db/migrate/20130405172032_create_product_images.rb', line 17

def down
  drop_table :product_images
end

#upObject



2
3
4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/forge/db/migrate/20130405172032_create_product_images.rb', line 2

def up
  create_table "product_images" do |t|
    t.integer  "product_id"
    t.integer  "image_file_size"
    t.string   "image_file_name"
    t.string   "image_content_type"
    t.integer  "list_order"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  add_index "product_images", ["list_order"], :name => "index_product_images_on_list_order"
  add_index "product_images", ["product_id"], :name => "index_product_images_on_product_id"
end