mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-11-28 09:24:24 +01:00
migrate invoices marked as paid with stripe
This commit is contained in:
parent
5f4c322fd5
commit
54fe1fea92
@ -58,6 +58,12 @@ class AddObjectToInvoiceItem < ActiveRecord::Migration[5.2]
|
||||
WHERE id = #{subscription_item.id}
|
||||
)
|
||||
end
|
||||
|
||||
execute %(
|
||||
UPDATE invoices
|
||||
SET payment_method = 'card'
|
||||
WHERE payment_method ='stripe'
|
||||
)
|
||||
remove_column :invoice_items, :subscription_id
|
||||
remove_reference :invoices, :invoiced, polymorphic: true
|
||||
|
||||
@ -95,6 +101,12 @@ class AddObjectToInvoiceItem < ActiveRecord::Migration[5.2]
|
||||
WHERE id = #{ii.id}
|
||||
)
|
||||
end
|
||||
|
||||
execute %(
|
||||
UPDATE invoices
|
||||
SET payment_method = 'stripe'
|
||||
WHERE payment_method ='card'
|
||||
)
|
||||
remove_column :invoice_items, :main
|
||||
remove_reference :invoice_items, :object, polymorphic: true
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user