1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-11-28 09:24:24 +01:00
fab-manager/db/migrate/20221228160449_create_cart_item_reservation_slot.rb

16 lines
508 B
Ruby
Raw Normal View History

2022-12-28 17:51:27 +01:00
# 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