Repository navigation
Best Practices for Milvus Schema Migrations Across Environments #54554
Replies: 1 comment
|
Hi @Kevinpaulson2002, 1. Online schema changesMilvus 3.0 introduced online schema evolution: you can add, backfill, and drop columns while the collection keeps serving traffic — no offline rebuild of the collection is required.
For example: What still cannot be changed in place:
So for your example: both "adding a field" and even "adding a new vector column" are online operations in 3.0. A full collection rebuild is only required for changes that cannot be expressed as a new field (e.g., changing the primary key or partition key). 2. Is there a Flyway equivalent for Milvus?There is no official Flyway/Liquibase-style migration tool for Milvus today. The The common practice is to build the same workflow yourself, which is straightforward since all schema operations are SDK/REST calls:
For truly breaking changes that cannot be expressed as a new nullable field — e.g., changing the primary key or partition key — use a blue/green pattern since these can't be altered in place:
3. SDK, CLI, or REST?All of them are available — REST/cURL is not required:
Suggested workflow summary
Relevant docs:
Hope this helps |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hi everyone,
I'm a beginner with Milvus and would like to understand the recommended best practices for managing collection schemas in a production application.
Suppose Tool Mapper Service v1 in QA uses a collection with schema v1. When we deploy Tool Mapper Service v1 to UAT and production, the collection schema should remain consistent. Later, in QA v2, we introduce a schema change, such as adding a field or changing the vector configuration. How should we safely propagate that change to UAT and production?
In relational databases, we use tools like Flyway to manage versioned schema migrations (after altering or dropping the columsn or any table schema changes). Is there a similar recommended tool or standard practice for Milvus?
Also, can collection creation and schema modifications be managed through an SDK or CLI, or are we expected to use REST APIs/cURL?
I'd appreciate any guidance on the recommended workflow for managing schema versions and migrations across QA, UAT, and production.
Thank you!
All reactions