summaryrefslogtreecommitdiff
path: root/db/migrate/20230412020105_create_product_orders.rb
blob: 1b2494ba3bd46f32173387b4c31b54a482629920 (plain)
1
2
3
4
5
6
7
8
9
10
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