1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-01 12:24:28 +01:00
fab-manager/db/migrate/20221228160449_create_cart_item_reservation_slot.rb
2023-02-15 10:29:46 +01:00

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