1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-11-29 10:24:20 +01:00
fab-manager/db/migrate/20220818160821_create_order_items.rb

17 lines
382 B
Ruby
Raw Normal View History

2022-08-19 19:59:13 +02:00
# 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