Migration to v1.20.0
Dear Lago Community, π
We will soon release a new version of Lago, including infrastructure improvements to ensure scalability.
What changes will be made?
One of the changes concerns zero fees, which have no accounting value but still require compute resources. In the next and subsequent versions, Lago will no longer generate these fees.
We know that some of our users have been relying on the invoice.fees.from_date
and invoice.fees.to_date
fields linked to zero fees for certain internal processes.
Therefore, we have introduced a new invoice.billing_periods
field to provide you with the dates of the billing period for each type of charge (see example below).
In addition, if you are running a self-hosted instance of Lago, upgrading it will trigger a migration to delete existing zero fees. This migration may take some time, so if your database contains a large volume of fees, we recommend that you perform the migration before deploying the new version (see steps below).
Cloud users do not need to follow the instructions below, as the migration will be performed by the Lago Team.
What should self-hosted users do?
1. Check the number of fees
You can run the following SQL query to check the number of fee objects that will be removed from the database. If the result is greater than 1M (one million), you should perform the migration before deploying the new version.
2. Remove zero fees
To delete existing zero fees, open a Rails console in a production instance using bundle exec rails c
and run the following script:
It can take a long time to complete this operation. In case of error, you can retry until the script outputs All fees have been removed - {time}
.
What is the timeline?
In order to streamline the billing process, we recommend that you perform the migration as soon as possible, and deploy v1.20.0
as soon as itβs available (we will release it before the end of January).
Please let us know if you have any questions, we will be happy to help. Thanks!
The Lago Team
Was this page helpful?