negos_app/db/migrate/20160214183718_create_product_images.rb
2017-09-19 11:33:15 +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