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

migrate payment schedule items marked as paid with stripe

This commit is contained in:
Sylvain 2021-06-03 15:02:48 +02:00
parent ea774e2080
commit 5f4c322fd5

View File

@ -32,6 +32,12 @@ class CreatePaymentScheduleObjects < ActiveRecord::Migration[5.2]
) )
end 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_id
remove_column :payment_schedules, :scheduled_type remove_column :payment_schedules, :scheduled_type
PaymentScheduleItem.update_all("details = details - 'subscription_id'") PaymentScheduleItem.update_all("details = details - 'subscription_id'")
@ -62,6 +68,12 @@ class CreatePaymentScheduleObjects < ActiveRecord::Migration[5.2]
end end
end end
execute %(
UPDATE payment_schedules_items
SET payment_method = 'stripe'
WHERE payment_method = 'card'
)
drop_table :payment_schedule_objects drop_table :payment_schedule_objects
# chain records # chain records