What are the changes?
Multiple payment methods per customer
Starting with v1.50.0, Lago supports storing multiple payment methods per customer. To enable this, payment methods are now stored in a dedicated table. Previously, a customer’s payment method was stored on the payment provider customer record, which only allowed a single payment method. As a result, existing payment methods must be migrated to the new table. This is done through provider-specific rake tasks that backfill payment methods from the payment provider customer records into Lago’s new dedicated table. These tasks must be triggered manually based on the payment providers you use.Why are we doing this?
Previously, the payment method was stored on the payment provider customer record, which only allowed a single payment method per customer. By moving payment methods to a dedicated table, Lago can now store and manage multiple payment methods for the same customer, providing more flexibility for billing and collection.What should self-hosted users do?
Cloud users do not need to follow these instructions as the migration will be performed by the Lago Team.
Migration Steps
1. Install Lago v1.50.0
Install the new version.2. Run the backfill tasks for the providers you use
Open a shell (bash) on your API server and run the backfill task for each payment provider you have configured. You only need to run the tasks that correspond to the payment methods used in your installation. StripeThe backfill tasks are safe to run multiple times. If a payment method has already been migrated, it will not be duplicated.