From b9e6c425a6142b2b78311cfc7b51aa0de7481440 Mon Sep 17 00:00:00 2001 From: HombreLaser Date: Tue, 11 Apr 2023 20:28:11 -0600 Subject: Añadidos modelos para órdenes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/migrate/20230412020105_create_product_orders.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 db/migrate/20230412020105_create_product_orders.rb (limited to 'db/migrate/20230412020105_create_product_orders.rb') 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 -- cgit v1.2.3