refactor(db): shim notifications.search_space_id to physical workspace_id

Phase 1 (rename DB) commit 1d: attribute->physical column shim on the
notifications satellite model, plus the inbox-list index column-ref and
its name aligned to workspace (ix_notifications_user_workspace_created).
This commit is contained in:
CREDO23 2026-06-26 12:12:13 +02:00
parent 9271678c73
commit bb953e6857

View file

@ -34,9 +34,9 @@ class Notification(BaseModel, TimestampMixin):
), ),
# Serves the paginated inbox list query. # Serves the paginated inbox list query.
Index( Index(
"ix_notifications_user_space_created", "ix_notifications_user_workspace_created",
"user_id", "user_id",
"search_space_id", "workspace_id",
"created_at", "created_at",
), ),
) )
@ -48,6 +48,7 @@ class Notification(BaseModel, TimestampMixin):
index=True, index=True,
) )
search_space_id = Column( search_space_id = Column(
"workspace_id",
Integer, Integer,
ForeignKey("searchspaces.id", ondelete="CASCADE"), ForeignKey("searchspaces.id", ondelete="CASCADE"),
nullable=True, nullable=True,