18 lines
499 B
Ruby
Executable File
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
|