feat: separate Passages tables (#2245)
Co-authored-by: Mindy Long <mindy@letta.com>
This commit is contained in:
@@ -31,30 +31,19 @@ class UserMixin(Base):
|
||||
|
||||
user_id: Mapped[str] = mapped_column(String, ForeignKey("users.id"))
|
||||
|
||||
class FileMixin(Base):
|
||||
"""Mixin for models that belong to a file."""
|
||||
|
||||
__abstract__ = True
|
||||
|
||||
file_id: Mapped[str] = mapped_column(String, ForeignKey("files.id"))
|
||||
|
||||
class AgentMixin(Base):
|
||||
"""Mixin for models that belong to an agent."""
|
||||
|
||||
__abstract__ = True
|
||||
|
||||
agent_id: Mapped[str] = mapped_column(String, ForeignKey("agents.id"))
|
||||
agent_id: Mapped[str] = mapped_column(String, ForeignKey("agents.id", ondelete="CASCADE"))
|
||||
|
||||
class FileMixin(Base):
|
||||
"""Mixin for models that belong to a file."""
|
||||
|
||||
__abstract__ = True
|
||||
|
||||
file_id: Mapped[Optional[str]] = mapped_column(
|
||||
String,
|
||||
ForeignKey("files.id", ondelete="CASCADE"),
|
||||
nullable=True
|
||||
)
|
||||
file_id: Mapped[Optional[str]] = mapped_column(String, ForeignKey("files.id", ondelete="CASCADE"))
|
||||
|
||||
|
||||
class SourceMixin(Base):
|
||||
@@ -62,7 +51,7 @@ class SourceMixin(Base):
|
||||
|
||||
__abstract__ = True
|
||||
|
||||
source_id: Mapped[str] = mapped_column(String, ForeignKey("sources.id"))
|
||||
source_id: Mapped[str] = mapped_column(String, ForeignKey("sources.id", ondelete="CASCADE"), nullable=False)
|
||||
|
||||
|
||||
class SandboxConfigMixin(Base):
|
||||
|
||||
Reference in New Issue
Block a user