feat(db): replace deferred unique constraints with partial unique indexes for LLM model configs

Replace deferred UniqueConstraints with partial unique indexes for user and group default configurations in the LLM model configs table. This change improves performance and ensures at most one default config per user/group while maintaining data integrity. The migration script has been updated accordingly to create and drop the new indexes.
This commit is contained in:
YueGuobin committed 2026-03-03 17:57:32 +08:00
1 parent d42fff49a5
commit fc7275878e
3 files changed
+23 -22

No files matched your search

-1
View File
@@ -35,7 +35,6 @@ from .controller.llm_model_configs import (
LLMModelConfigCreate,
LLMModelConfigUpdate,
LLMModelConfigResponse,
LLMModelConfigListResponse,
LLMModelConfigWithSource,
LLMModelConfigInheritedResponse
)