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

15 lines
506 B
Ruby

# frozen_string_literal: true
# From this migration, we save the pending coupons in database, instead of just creating them on the fly
class CreateCartItemCoupon < ActiveRecord::Migration[5.2]
def change
create_table :cart_item_coupons do |t|
t.references :coupon, foreign_key: true
t.references :customer_profile, foreign_key: { to_table: 'invoicing_profiles' }
t.references :operator_profile, foreign_key: { to_table: 'invoicing_profiles' }
t.timestamps
end
end
end