mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-06-29 15:31:05 +08:00
### Related issues Closes #15312 ### What problem does this PR solve? `tools/scripts/mysql_migration.py` built batch INSERT SQL for the `tenant_model_provider` stage using f-strings with raw `llm_factory` and `tenant_id` values. If either value contained a single quote, migration SQL could fail; this also created unnecessary SQL-injection risk in the migration path. This PR replaces string interpolation with parameterized SQL placeholders in `TenantModelProviderStage.execute()`. The migration now safely handles quoted values and executes deterministically across existing tenant data.