[changes] From the perspective of logical judgment, to determine the situation of duplicate names
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import datetime
|
||||
|
||||
from sqlalchemy import Boolean, Column, DateTime, Float, Integer, String, UniqueConstraint
|
||||
from sqlalchemy import Boolean, Column, DateTime, Float, Integer, String
|
||||
from sqlalchemy.dialects.postgresql import UUID
|
||||
|
||||
from app.db import Base
|
||||
@@ -9,9 +9,6 @@ from app.db import Base
|
||||
class MemoryConfig(Base):
|
||||
"""记忆配置表 - 用于存储记忆系统的配置参数"""
|
||||
__tablename__ = "memory_config"
|
||||
__table_args__ = (
|
||||
UniqueConstraint('workspace_id', 'config_name', name='uq_workspace_config_name'),
|
||||
)
|
||||
|
||||
# 主键
|
||||
config_id = Column(UUID(as_uuid=True), primary_key=True, comment="配置ID")
|
||||
|
||||
@@ -9,7 +9,7 @@ Classes:
|
||||
|
||||
import datetime
|
||||
import uuid
|
||||
from sqlalchemy import Column, String, DateTime, Text, ForeignKey, Boolean, UniqueConstraint
|
||||
from sqlalchemy import Column, String, DateTime, Text, ForeignKey, Boolean
|
||||
from sqlalchemy.dialects.postgresql import UUID
|
||||
from sqlalchemy.orm import relationship
|
||||
from app.db import Base
|
||||
@@ -18,9 +18,6 @@ from app.db import Base
|
||||
class OntologyClass(Base):
|
||||
"""本体类型表 - 用于存储某个场景提取出来的本体类型信息"""
|
||||
__tablename__ = "ontology_class"
|
||||
__table_args__ = (
|
||||
UniqueConstraint('scene_id', 'class_name', name='uq_scene_class_name'),
|
||||
)
|
||||
|
||||
# 主键
|
||||
class_id = Column(UUID(as_uuid=True), primary_key=True, default=uuid.uuid4, index=True, comment="类型ID")
|
||||
|
||||
Reference in New Issue
Block a user