mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-11-28 09:24:24 +01:00
16 lines
508 B
Ruby
16 lines
508 B
Ruby
|
# frozen_string_literal: true
|
||
|
|
||
|
# A relation table between a pending reservation and a slot
|
||
|
class CreateCartItemReservationSlot < ActiveRecord::Migration[5.2]
|
||
|
def change
|
||
|
create_table :cart_item_reservation_slots do |t|
|
||
|
t.references :cart_item, polymorphic: true, index: { name: 'index_cart_item_slots_on_cart_item' }
|
||
|
t.references :slot, foreign_key: true
|
||
|
t.references :slots_reservation, foreign_key: true
|
||
|
t.boolean :offered, default: false
|
||
|
|
||
|
t.timestamps
|
||
|
end
|
||
|
end
|
||
|
end
|