- Use the migration endpoints: The easiest option. You just need to make a POST request.
- Migrate manually using the
MigrationManager: If you prefer a more controlled migration experience, you can use the MigrationManager class to upgrade or downgrate your schemas.
Using the Migration Endpoints
There are two available endpoints:POST /databases/all/migrate: to migrate all tables in all databases.POST /databases/{db_id}/migrate: to migrate all tables in the given database.
target_version query parameter.
The
target_version is the Agno version the schema corresponds to.For example, if you have upgraded to Agno v2.3.0, you will want your target version to be 2.3.0.Migrate manually using the MigrationManager
All migrations are ultimately handled by theMigrationManager class.
You can use it directly to have total control over your migration process, or use one of the supporting scripts we provide.
You can read more about this in the Database Migrations page.