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
