Update data-annotation-init.sql and Alembic migration to support both new and old deployments:
SQL Initialization Script (data-annotation-init.sql):
- Add file_version column to t_dm_annotation_results table
- Add Alembic version table creation and version insertion
- New deployments using this script will have latest schema and Alembic version marked
Alembic Migration (20250205_0001_add_file_version.py):
- Add column_exists() helper function to detect if column already exists
- Add compatibility check in upgrade(): skip if column exists (new SQL init)
- Add informative print messages for deployment clarity
- Enhanced docstrings explaining compatibility strategy
Deployment Scenarios:
1. New deployment with latest SQL script: Schema created with file_version, Alembic marked as applied
2. Old deployment upgrade: Alembic detects missing column and adds it
This ensures backward compatibility while supporting fresh installs with complete schema.
- 在标注配置模板表创建语句中添加 IF NOT EXISTS 条件
- 在标注项目表创建语句中添加 IF NOT EXISTS 条件
- 在标注结果表创建语句中添加 IF NOT EXISTS 条件
- 在自动标注任务表创建语句中添加 IF NOT EXISTS 条件
- 防止重复执行脚本时出现表已存在的错误
- 提高数据库初始化脚本的健壮性
* fix: fix the path for backend-python imaage building
* feature: add mysql collection and starrocks collection
* feature: add mysql collection and starrocks collection
* fix: change the permission of those files which collected from nfs to 754
* fix: delete collected files, config files and log files while deleting collection task
* fix: add the collection task detail api
* fix: change the log of collecting for dataset
* fix: add collection task selecting while creating and updating dataset
* fix: set the umask value to 0022 for java process
* feature: LabelStudio jumps without login
* refactor: modify data collection to python implementation
* refactor: modify data collection to python implementation
* refactor: modify data collection to python implementation
* refactor: modify data collection to python implementation
* refactor: modify data collection to python implementation
* refactor: modify data collection to python implementation
* fix: remove terrabase dependency
* feature: add the collection task executions page and the collection template page
* fix: fix the collection task creation
* fix: fix the collection task creation
* fix(chart): update Helm chart helpers and values for improved configuration
* feat(SynthesisTaskTab): enhance task table with tooltip support and improved column widths
* feat(CreateTask, SynthFileTask): improve task creation and detail view with enhanced payload handling and UI updates
* feat(SynthFileTask): enhance file display with progress tracking and delete action
* feat(SynthFileTask): enhance file display with progress tracking and delete action
* feat(SynthDataDetail): add delete action for chunks with confirmation prompt
* feat(SynthDataDetail): update edit and delete buttons to icon-only format
* feat(SynthDataDetail): add confirmation modals for chunk and synthesis data deletion
* feat(DocumentSplitter): add enhanced document splitting functionality with CJK support and metadata detection
* feat(DataSynthesis): refactor data synthesis models and update task handling logic
* feat(DataSynthesis): streamline synthesis task handling and enhance chunk processing logic
* feat(DataSynthesis): refactor data synthesis models and update task handling logic
* fix(generation_service): ensure processed chunks are incremented regardless of question generation success
* feat(CreateTask): enhance task creation with new synthesis templates and improved configuration options
* feat(CreateTask): enhance task creation with new synthesis templates and improved configuration options
* feat(CreateTask): enhance task creation with new synthesis templates and improved configuration options
* feat(CreateTask): enhance task creation with new synthesis templates and improved configuration options
* feature: add cot data evaluation function
* fix: added verification to evaluation results
* fix: fix the prompt for evaluating
* fix: 修复当评估结果为空导致读取失败的问题
* feat: Enhance knowledge base management with collection renaming, imp…
* feat: Update Milvus integration with new API, enhance collection mana…
* Merge branch 'refs/heads/main' into dev
* feat: Refactor dataset file pagination and enhance retrieval function…
* Merge branch 'main' into dev