Dear Lago Community, π
Weβre writing to inform you about important changes in Lago v1.31.0 that will enhance data consistency. application performances and prepare upcoming features.
What are the changes?
Filling organization_id
on every tables of the application
The organization_id
column was recently added on every tables related to an organization.
Since filling this column is an heavy task, no migration was backfilling it for existing records. It was only populated on newly created records.
As we now need to be able to rely on this column in the application, we have to make sures that every single records has an organization_id
value.
Why are we doing this?
These changes are made to increase the performannces of the application and to ease the development on future features.
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.
If youβre using a version below v1.20.0
, please first follow the migration steps for v1.20.0, then for v1.25.0, then for v1.28.1, then for v1.29.0.
Only after completing those should you proceed to v1.31.0.
Migration Steps
- Install the Lago version 1.30.0
- Open a shell (bash) on your API server
- Run the migration task:
bundle exec rails migrations:fill_organization_id
The task will:
- Check for all database table to identify the ones that require a migration
- Enqueue jobs for each tables needing a backfill
- Loop over all migrating tables until all records are updated
All resources are processed in background jobs, with 1000 records per batch.
The task will monitor the values and give you the number of remaing records.
##################################
Starting filling organization_id
#### Checking for resource to fill ####
"- Checking AddOn::AppliedTax: π"
" -> Nothing to do β
"
"- Checking AdjustedFee: π"
" -> Nothing to do β
"
"- Checking AppliedCoupon: π"
" -> Nothing to do β
"
"- Checking AppliedInvoiceCustomSection: π"
" -> Nothing to do β
"
"- Checking AppliedUsageThreshold: π"
" -> Nothing to do β
"
"- Checking BillableMetricFilter: π"
" -> Nothing to do β
"
"- Checking BillingEntity::AppliedTax: π"
" -> Nothing to do β
"
"- Checking ChargeFilterValue: π"
" -> Nothing to do β
"
"- Checking ChargeFilter: π"
" -> Nothing to do β
"
"- Checking Charge::AppliedTax: π"
" -> Nothing to do β
"
"- Checking Charge: π"
" -> Nothing to do β
"
"- Checking Commitment::AppliedTax: π"
" -> Nothing to do β
"
"- Checking Commitment: π"
" -> Nothing to do β
"
"- Checking CouponTarget: π"
" -> Nothing to do β
"
"- Checking CreditNoteItem: π"
" -> Nothing to do β
"
"- Checking CreditNote::AppliedTax: π"
" -> Nothing to do β
"
"- Checking CreditNote: π"
" -> Nothing to do β
"
"- Checking Credit: π"
" -> Nothing to do β
"
"- Checking Metadata::CustomerMetadata: π"
" -> Nothing to do β
"
"- Checking Customer::AppliedTax: π"
" -> Nothing to do β
"
"- Checking DataExportPart: π"
" -> Nothing to do β
"
"- Checking DunningCampaignThreshold: π"
" -> Nothing to do β
"
"- Checking Fee::AppliedTax: π"
" -> Nothing to do β
"
"- Checking IdempotencyRecord: π"
" -> Nothing to do β
"
"- Checking IntegrationCollectionMappings::BaseCollectionMapping: π"
" -> Nothing to do β
"
"- Checking IntegrationCustomers::BaseCustomer: π"
" -> Nothing to do β
"
"- Checking IntegrationItem: π"
" -> Nothing to do β
"
"- Checking IntegrationMappings::BaseMapping: π"
" -> Nothing to do β
"
"- Checking IntegrationResource: π"
" -> Nothing to do β
"
"- Checking Metadata::InvoiceMetadata: π"
" -> Nothing to do β
"
"- Checking InvoiceSubscription: π"
" -> Nothing to do β
"
"- Checking PaymentRequest::AppliedInvoice: π"
" -> Nothing to do β
"
"- Checking Invoice::AppliedTax: π"
" -> Nothing to do β
"
"- Checking PaymentProviderCustomers::BaseCustomer: π"
" -> Nothing to do β
"
"- Checking Payment: π"
" -> Nothing to do β
"
"- Checking Payment: π"
" -> Nothing to do β
"
"- Checking Plan::AppliedTax: π"
" -> Nothing to do β
"
"- Checking RecurringTransactionRule: π"
" -> Nothing to do β
"
"- Checking Refund: π"
" -> Nothing to do β
"
"- Checking Subscription: π"
" -> Nothing to do β
"
"- Checking UsageThreshold: π"
" -> Nothing to do β
"
"- Checking WalletTransaction: π"
" -> Nothing to do β
"
"- Checking Wallet: π"
" -> Nothing to do β
"
"- Checking Webhook: π"
" -> Nothing to do β
"
#### All good, ready to Upgrade! β
####
- Install Lago v1.31.0
Get Involved
If you have any questions or encounter issues during the migration, please reach out to us via the Slack community. Our team is here to help you through this transition.
Thanks for your understanding and continued support.
The Lago Team
Responses are generated using AI and may contain mistakes.