mirror of
https://github.com/MODSetter/SurfSense.git
synced 2025-09-04 03:29:07 +00:00
add requested changes
This commit is contained in:
parent
ad0a1e5c97
commit
605d0f71fd
3 changed files with 6 additions and 32 deletions
|
@ -1,7 +1,7 @@
|
||||||
"""Add Google Calendar connector enums
|
"""Add Google Calendar connector enums
|
||||||
|
|
||||||
Revision ID: 15
|
Revision ID: 17
|
||||||
Revises: 14
|
Revises: 16
|
||||||
Create Date: 2024-02-01 12:00:00.000000
|
Create Date: 2024-02-01 12:00:00.000000
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
@ -11,8 +11,8 @@ from collections.abc import Sequence
|
||||||
from alembic import op
|
from alembic import op
|
||||||
|
|
||||||
# revision identifiers, used by Alembic.
|
# revision identifiers, used by Alembic.
|
||||||
revision: str = "15"
|
revision: str = "17"
|
||||||
down_revision: str | None = "14"
|
down_revision: str | None = "16"
|
||||||
branch_labels: str | Sequence[str] | None = None
|
branch_labels: str | Sequence[str] | None = None
|
||||||
depends_on: str | Sequence[str] | None = None
|
depends_on: str | Sequence[str] | None = None
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ def downgrade() -> None:
|
||||||
"""Remove 'GOOGLE_CALENDAR_CONNECTOR' from enum types."""
|
"""Remove 'GOOGLE_CALENDAR_CONNECTOR' from enum types."""
|
||||||
|
|
||||||
# Note: PostgreSQL doesn't support removing enum values directly
|
# Note: PostgreSQL doesn't support removing enum values directly
|
||||||
# This would require recreating the enum type, which is complex
|
# This would require recreating the enrelum type, which is complex
|
||||||
# For now, we'll leave the enum values in place
|
# For now, we'll leave the enum values in place
|
||||||
# In a production environment, you might want to implement a more sophisticated downgrade
|
# In a production environment, you might want to implement a more sophisticated downgrade
|
||||||
pass
|
pass
|
|
@ -17,6 +17,7 @@ You are SurfSense, an advanced AI research assistant that synthesizes informatio
|
||||||
- LINEAR_CONNECTOR: "Linear project issues and discussions" (personal project management)
|
- LINEAR_CONNECTOR: "Linear project issues and discussions" (personal project management)
|
||||||
- JIRA_CONNECTOR: "Jira project issues, tickets, and comments" (personal project tracking)
|
- JIRA_CONNECTOR: "Jira project issues, tickets, and comments" (personal project tracking)
|
||||||
- CONFLUENCE_CONNECTOR: "Confluence pages and comments" (personal project documentation)
|
- CONFLUENCE_CONNECTOR: "Confluence pages and comments" (personal project documentation)
|
||||||
|
- CLICKUP_CONNECTOR: "ClickUp tasks and project data" (personal task management)
|
||||||
- GOOGLE_CALENDAR_CONNECTOR: "Google Calendar events, meetings, and schedules" (personal calendar and time management)
|
- GOOGLE_CALENDAR_CONNECTOR: "Google Calendar events, meetings, and schedules" (personal calendar and time management)
|
||||||
- DISCORD_CONNECTOR: "Discord server messages and channels" (personal community interactions)
|
- DISCORD_CONNECTOR: "Discord server messages and channels" (personal community interactions)
|
||||||
- TAVILY_API: "Tavily search API results" (personalized search results)
|
- TAVILY_API: "Tavily search API results" (personalized search results)
|
||||||
|
|
|
@ -246,21 +246,6 @@ class SearchSourceConnector(BaseModel, TimestampMixin):
|
||||||
user = relationship("User", back_populates="search_source_connectors")
|
user = relationship("User", back_populates="search_source_connectors")
|
||||||
|
|
||||||
|
|
||||||
class GoogleCalendarAccount(BaseModel):
|
|
||||||
__tablename__ = "google_calendar_accounts"
|
|
||||||
|
|
||||||
user_id = Column(
|
|
||||||
UUID(as_uuid=True),
|
|
||||||
ForeignKey("user.id", ondelete="CASCADE"),
|
|
||||||
nullable=False,
|
|
||||||
unique=True,
|
|
||||||
)
|
|
||||||
|
|
||||||
access_token = Column(String, nullable=False)
|
|
||||||
refresh_token = Column(String, nullable=True)
|
|
||||||
user = relationship("User", back_populates="calendar_account")
|
|
||||||
|
|
||||||
|
|
||||||
class LLMConfig(BaseModel, TimestampMixin):
|
class LLMConfig(BaseModel, TimestampMixin):
|
||||||
__tablename__ = "llm_configs"
|
__tablename__ = "llm_configs"
|
||||||
|
|
||||||
|
@ -314,12 +299,6 @@ if config.AUTH_TYPE == "GOOGLE":
|
||||||
search_source_connectors = relationship(
|
search_source_connectors = relationship(
|
||||||
"SearchSourceConnector", back_populates="user"
|
"SearchSourceConnector", back_populates="user"
|
||||||
)
|
)
|
||||||
calendar_account = relationship(
|
|
||||||
"GoogleCalendarAccount",
|
|
||||||
back_populates="user",
|
|
||||||
uselist=False,
|
|
||||||
cascade="all, delete-orphan",
|
|
||||||
)
|
|
||||||
llm_configs = relationship(
|
llm_configs = relationship(
|
||||||
"LLMConfig",
|
"LLMConfig",
|
||||||
back_populates="user",
|
back_populates="user",
|
||||||
|
@ -354,12 +333,6 @@ else:
|
||||||
search_source_connectors = relationship(
|
search_source_connectors = relationship(
|
||||||
"SearchSourceConnector", back_populates="user"
|
"SearchSourceConnector", back_populates="user"
|
||||||
)
|
)
|
||||||
calendar_account = relationship(
|
|
||||||
"GoogleCalendarAccount",
|
|
||||||
back_populates="user",
|
|
||||||
uselist=False,
|
|
||||||
cascade="all, delete-orphan",
|
|
||||||
)
|
|
||||||
llm_configs = relationship(
|
llm_configs = relationship(
|
||||||
"LLMConfig",
|
"LLMConfig",
|
||||||
back_populates="user",
|
back_populates="user",
|
||||||
|
|
Loading…
Add table
Reference in a new issue