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.
Migration Steps
- Install the Lago version 1.30.0
- Open a shell (bash) on your API server
- Run the migration task:
- 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.
- Install Lago v1.31.0