mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-11-29 10:24:20 +01:00
17 lines
382 B
Ruby
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
|