1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-01 12:24:28 +01:00
fab-manager/db/migrate/20221229100157_create_cart_item_subscription.rb

15 lines
463 B
Ruby
Raw Normal View History

2022-12-28 17:51:27 +01:00
# frozen_string_literal: true
# From this migration, we save the pending subscriptions in database, instead of just creating them on the fly
class CreateCartItemSubscription < ActiveRecord::Migration[5.2]
def change
create_table :cart_item_subscriptions do |t|
t.references :plan, foreign_key: true
t.datetime :start_at
t.references :customer_profile, foreign_key: { to_table: 'invoicing_profiles' }
t.timestamps
end
end
end