Skip to content

Commit

Permalink
[1802] adjust the code to support a different db schemas (onyx-dot-ap…
Browse files Browse the repository at this point in the history
  • Loading branch information
stianrincon authored and rajiv chodisetti committed Oct 2, 2024
1 parent 9668aae commit bc3dc27
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions backend/danswer/db/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@


class Base(DeclarativeBase):
pass
__abstract__ = True


class EncryptedString(TypeDecorator):
Expand Down Expand Up @@ -448,7 +448,7 @@ class Document(Base):
)
tags = relationship(
"Tag",
secondary="document__tag",
secondary=Document__Tag.__table__,
back_populates="documents",
)

Expand All @@ -465,7 +465,7 @@ class Tag(Base):

documents = relationship(
"Document",
secondary="document__tag",
secondary=Document__Tag.__table__,
back_populates="tags",
)

Expand Down Expand Up @@ -814,7 +814,7 @@ class SearchDoc(Base):

chat_messages = relationship(
"ChatMessage",
secondary="chat_message__search_doc",
secondary=ChatMessage__SearchDoc.__table__,
back_populates="search_docs",
)

Expand Down Expand Up @@ -957,7 +957,7 @@ class ChatMessage(Base):
)
search_docs: Mapped[list["SearchDoc"]] = relationship(
"SearchDoc",
secondary="chat_message__search_doc",
secondary=ChatMessage__SearchDoc.__table__,
back_populates="chat_messages",
)
# NOTE: Should always be attached to the `assistant` message.
Expand Down

0 comments on commit bc3dc27

Please sign in to comment.