negos_app/db/migrate/20160214155054_create_product_langs.rb
2017-09-19 11:33:15 +02:00

18 lines
499 B
Ruby
Executable File

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