class CreateProductLangs < ActiveRecord::Migration
  def change
    create_table :product_langs do |t|
      t.string :title
      t.string :lang
      t.text :description
      t.string :slug
      t.references :product_category, index: true
      t.references :product_collection, index: true
      t.references :product, index: true

      t.timestamps null: false
    end
    add_foreign_key :product_langs, :product_categories
    add_foreign_key :product_langs, :product_collections
  end
end
