fix: 补齐知识库元数据管理与生命周期校验

This commit is contained in:
2026-07-12 15:30:23 +08:00
parent c3639fe30d
commit 8266d845c0
13 changed files with 640 additions and 59 deletions

View File

@@ -0,0 +1,20 @@
from __future__ import annotations
from alembic import op
revision = "0008_unique_knowledge_feishu_node"
down_revision = "0007_knowledge_agent_rebuild"
branch_labels = None
depends_on = None
def upgrade() -> None:
op.create_unique_constraint(
"uq_knowledge_feishu_node",
"sys_knowledge",
["feishu_space_id", "feishu_node_id"],
)
def downgrade() -> None:
op.drop_constraint("uq_knowledge_feishu_node", "sys_knowledge", type_="unique")