summaryrefslogtreecommitdiff
path: root/db/migrate/20230412020105_create_product_orders.rb
diff options
context:
space:
mode:
authorHombreLaser <sebastian-440@live.com>2023-04-11 20:28:11 -0600
committerHombreLaser <sebastian-440@live.com>2023-04-11 20:28:11 -0600
commitb9e6c425a6142b2b78311cfc7b51aa0de7481440 (patch)
tree9350e616a04a7ddbc148ed86ee925fb589dd7665 /db/migrate/20230412020105_create_product_orders.rb
parentbb9554c298a5edc6c0ff90ec7497adff299891e0 (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.rb11
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