botserver/migrations
Rodrigo Rodriguez (Pragmatismo) 1f150228af Add billion-scale database redesign with enums and sharding
Database Schema v7.0.0:
- Create new 'gb' schema with PostgreSQL ENUMs instead of VARCHAR for all domain values
- Add sharding infrastructure (shard_config, tenant_shard_map tables)
- Implement partitioned tables for sessions, messages, and analytics (monthly partitions)
- Add Snowflake-like ID generation for distributed systems
- Design for billion-user scale with proper indexing strategies

Rust Enums:
- Add comprehensive enum types in core/shared/enums.rs
- Implement ToSql/FromSql for Diesel ORM integration
- Include: ChannelType, MessageRole, MessageType, LlmProvider, ContextProvider
- Include: TaskStatus, TaskPriority, ExecutionMode, RiskLevel, ApprovalStatus, IntentType
- All enums stored as SMALLINT for efficiency

Other fixes:
- Fix hardcoded gpt-4 model in auto_task modules to use bot config
- Add vector_db to required bootstrap components
- Add Qdrant health check before KB indexing
- Change verbose START messages to trace level
- Fix episodic memory role handling in Claude client
- Disable auth for /api routes during development

This is a DESTRUCTIVE migration - only for fresh installations.
2025-12-29 11:27:13 -03:00
..
6.0.0_initial_schema feat(automation): increase schedule field size and improve task checking 2025-11-12 15:04:04 -03:00
6.0.1_bot_memories feat: add diesel_migrations and update dependencies 2025-11-12 12:48:06 -03:00
6.0.2_kb_tools feat: add diesel_migrations and update dependencies 2025-11-12 12:48:06 -03:00
6.0.3_kb_session_tables feat: add diesel_migrations and update dependencies 2025-11-12 12:48:06 -03:00
6.0.4_config_management feat: add diesel_migrations and update dependencies 2025-11-12 12:48:06 -03:00
6.0.5_automation_updates Fix config.csv loading on startup 2025-12-08 00:19:29 -03:00
6.0.6_user_accounts ``` Add comprehensive email account management and user settings 2025-11-21 09:28:35 -03:00
6.0.7_session_kb_tracking ``` Add comprehensive email account management and user settings 2025-11-21 09:28:35 -03:00
6.0.8_directory_integration - Even more keywords. 2025-11-22 12:26:16 -03:00
6.0.9_website_support Fix config.csv loading on startup 2025-12-08 00:19:29 -03:00
6.1.0_enterprise_suite Add DROP TABLE CASCADE at start of 6.1.0 migration for clean re-run 2025-12-29 08:18:14 -03:00
6.1.1_autotask_system feat(autotask): Implement AutoTask system with intent classification and app generation 2025-12-27 21:10:09 -03:00
6.1.2_table_role_access App generator LLM-only, app logs, knowledge base, web search, designer magic 2025-12-28 11:50:50 -03:00
6.1.3_knowledge_base_sources Add DROP TABLE for knowledge base tables to fix migration 2025-12-29 08:36:50 -03:00
7.0.0_billion_scale_redesign Add billion-scale database redesign with enums and sharding 2025-12-29 11:27:13 -03:00