1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-01 12:24:28 +01:00
fab-manager/db/migrate/20220818160821_create_order_items.rb
2022-08-19 20:03:09 +02:00

17 lines
382 B
Ruby

# frozen_string_literal:true
# OrderItem for save article of Order
class CreateOrderItems < ActiveRecord::Migration[5.2]
def change
create_table :order_items do |t|
t.belongs_to :order, foreign_key: true
t.references :orderable, polymorphic: true
t.integer :amount
t.integer :quantity
t.boolean :is_offered
t.timestamps
end
end
end