add requested changes

This commit is contained in:
CREDO23 2025-08-03 12:21:34 +02:00
parent ad0a1e5c97
commit 605d0f71fd
3 changed files with 6 additions and 32 deletions

View file

@ -1,7 +1,7 @@
"""Add Google Calendar connector enums
Revision ID: 15
Revises: 14
Revision ID: 17
Revises: 16
Create Date: 2024-02-01 12:00:00.000000
"""
@ -11,8 +11,8 @@ from collections.abc import Sequence
from alembic import op
# revision identifiers, used by Alembic.
revision: str = "15"
down_revision: str | None = "14"
revision: str = "17"
down_revision: str | None = "16"
branch_labels: 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."""
# 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
# In a production environment, you might want to implement a more sophisticated downgrade
pass

View file

@ -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)
- JIRA_CONNECTOR: "Jira project issues, tickets, and comments" (personal project tracking)
- 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)
- DISCORD_CONNECTOR: "Discord server messages and channels" (personal community interactions)
- TAVILY_API: "Tavily search API results" (personalized search results)

View file

@ -246,21 +246,6 @@ class SearchSourceConnector(BaseModel, TimestampMixin):
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):
__tablename__ = "llm_configs"
@ -314,12 +299,6 @@ if config.AUTH_TYPE == "GOOGLE":
search_source_connectors = relationship(
"SearchSourceConnector", back_populates="user"
)
calendar_account = relationship(
"GoogleCalendarAccount",
back_populates="user",
uselist=False,
cascade="all, delete-orphan",
)
llm_configs = relationship(
"LLMConfig",
back_populates="user",
@ -354,12 +333,6 @@ else:
search_source_connectors = relationship(
"SearchSourceConnector", back_populates="user"
)
calendar_account = relationship(
"GoogleCalendarAccount",
back_populates="user",
uselist=False,
cascade="all, delete-orphan",
)
llm_configs = relationship(
"LLMConfig",
back_populates="user",