Files
letta-server/letta/orm/sources_agents.py
Kian Jones b8e9a80d93 merge this (#4759)
* wait I forgot to comit locally

* cp the entire core directory and then rm the .git subdir
2025-09-17 15:47:40 -07:00

15 lines
554 B
Python

from sqlalchemy import ForeignKey, Index, String
from sqlalchemy.orm import Mapped, mapped_column
from letta.orm.base import Base
class SourcesAgents(Base):
"""Agents can have zero to many sources"""
__tablename__ = "sources_agents"
__table_args__ = (Index("ix_sources_agents_source_id", "source_id"),)
agent_id: Mapped[String] = mapped_column(String, ForeignKey("agents.id", ondelete="CASCADE"), primary_key=True)
source_id: Mapped[String] = mapped_column(String, ForeignKey("sources.id", ondelete="CASCADE"), primary_key=True)