fix: 补齐知识库元数据管理与生命周期校验
This commit is contained in:
@@ -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")
|
||||
Reference in New Issue
Block a user