diff options
author | HombreLaser <sebastian-440@live.com> | 2023-04-11 20:28:11 -0600 |
---|---|---|
committer | HombreLaser <sebastian-440@live.com> | 2023-04-11 20:28:11 -0600 |
commit | b9e6c425a6142b2b78311cfc7b51aa0de7481440 (patch) | |
tree | 9350e616a04a7ddbc148ed86ee925fb589dd7665 /db/migrate/20230412020105_create_product_orders.rb | |
parent | bb9554c298a5edc6c0ff90ec7497adff299891e0 (diff) |
Añadidos modelos para órdenes
Diffstat (limited to 'db/migrate/20230412020105_create_product_orders.rb')
-rw-r--r-- | db/migrate/20230412020105_create_product_orders.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/db/migrate/20230412020105_create_product_orders.rb b/db/migrate/20230412020105_create_product_orders.rb new file mode 100644 index 0000000..1b2494b --- /dev/null +++ b/db/migrate/20230412020105_create_product_orders.rb @@ -0,0 +1,11 @@ +class CreateProductOrders < ActiveRecord::Migration[7.0] + def change + create_table :product_orders do |t| + t.references :order, null: false, foreign_key: true + t.references :product, null: false, foreign_key: true + t.integer :quantity + + t.timestamps + end + end +end |