mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-11-29 10:24:20 +01:00
migrate payment schedule items marked as paid with stripe
This commit is contained in:
parent
ea774e2080
commit
5f4c322fd5
@ -32,6 +32,12 @@ class CreatePaymentScheduleObjects < ActiveRecord::Migration[5.2]
|
||||
)
|
||||
end
|
||||
|
||||
execute %(
|
||||
UPDATE payment_schedules_items
|
||||
SET payment_method = 'card'
|
||||
WHERE payment_method = 'stripe'
|
||||
)
|
||||
|
||||
remove_column :payment_schedules, :scheduled_id
|
||||
remove_column :payment_schedules, :scheduled_type
|
||||
PaymentScheduleItem.update_all("details = details - 'subscription_id'")
|
||||
@ -62,6 +68,12 @@ class CreatePaymentScheduleObjects < ActiveRecord::Migration[5.2]
|
||||
end
|
||||
end
|
||||
|
||||
execute %(
|
||||
UPDATE payment_schedules_items
|
||||
SET payment_method = 'stripe'
|
||||
WHERE payment_method = 'card'
|
||||
)
|
||||
|
||||
drop_table :payment_schedule_objects
|
||||
|
||||
# chain records
|
||||
|
Loading…
Reference in New Issue
Block a user