Skip to content
代码片段 群组 项目
未验证 提交 e004730b 编辑于 作者: Dmitry Gruzd's avatar Dmitry Gruzd 提交者: GitLab
浏览文件

Add ActiveContext migration framework

This introduces a comprehensive migration framework for Active Context
and adds collection management capabilities through database-specific executors.
These changes enable systematic database schema management and provide a unified
way to create and manage collections across different database backends.

Key changes:
- Introduce migration framework with version tracking and batch operation support
- Add database-specific executors for managing collections (PostgreSQL, Elasticsearch, OpenSearch)
- Implement partition strategy for handling sharded collections
- Move prefix configuration from Client to Adapter level
- Add migrations path configuration support

Technical details:
- Add Migration base class with versioning support (V1_0)
- Implement BatchOperationResult for tracking long-running operations
- Add collection creation with field type support (bigint, prefix, vector)
- Add partition management with naming strategy
- Add support for creating indices on fields based on database capabilities
- Implement database-specific collection creation logic:
  * PostgreSQL: Partitioned tables with vector support
  * Elasticsearch: Index templates and aliases
  * OpenSearch: Base executor structure (implementation pending)

The migration framework follows a similar pattern to ActiveRecord migrations,
with timestamped migration files and version tracking. Collections can be
created with specific field types and indexing options, which are translated
to the appropriate database-specific implementations.

Migration files should be placed in ee/db/active_context/migrate/ by default,
but this path can be configured through ActiveContext::Config.
上级 77533bab
No related branches found
No related tags found
无相关合并请求
显示
365 个添加26 个删除
加载中
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册