vita_app/db/migrate/20160214183718_create_product_images.rb
Nicolas Bally 1d3af87d4c initial
2016-04-28 10:07:08 +02:00

15 lines
351 B
Ruby
Executable File

class CreateProductImages < ActiveRecord::Migration
def change
create_table :product_images do |t|
t.string :title
t.text :description
t.integer :position
t.references :image_file, index: true
t.references :product
t.timestamps null: false
end
add_foreign_key :product_images, :image_files
end
end