mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-12-01 12:24:28 +01:00
18 lines
710 B
Ruby
18 lines
710 B
Ruby
# frozen_string_literal: true
|
|
|
|
# From this migration, we save the pending machine/space/training reservations in database, instead of just creating them on the fly
|
|
class CreateCartItemReservation < ActiveRecord::Migration[5.2]
|
|
def change
|
|
create_table :cart_item_reservations do |t|
|
|
t.references :reservable, polymorphic: true, index: { name: 'index_cart_item_reservations_on_reservable' }
|
|
t.references :plan, foreign_key: true
|
|
t.boolean :new_subscription
|
|
t.references :customer_profile, foreign_key: { to_table: 'invoicing_profiles' }
|
|
t.references :operator_profile, foreign_key: { to_table: 'invoicing_profiles' }
|
|
t.string :type
|
|
|
|
t.timestamps
|
|
end
|
|
end
|
|
end
|