refactor(db): rename search_space_memberships table to workspace_memberships

Phase 1 (rename DB) commit 1g: rename the memberships table (no inbound
FKs reference it) and update the matching raw-SQL cleanup in the obsidian
plugin test. Relationship attribute names stay until Phase 2.
This commit is contained in:
CREDO23 2026-06-26 12:30:38 +02:00
parent 3b545540e9
commit 0ed043379d
2 changed files with 2 additions and 2 deletions

View file

@ -2102,7 +2102,7 @@ class SearchSpaceMembership(BaseModel, TimestampMixin):
Each user can be a member of multiple search spaces with different roles.
"""
__tablename__ = "search_space_memberships"
__tablename__ = "workspace_memberships"
__table_args__ = (
UniqueConstraint(
"user_id",

View file

@ -125,7 +125,7 @@ async def race_user_and_space(async_engine):
{"uid": user_id},
)
await cleanup.execute(
text("DELETE FROM search_space_memberships WHERE workspace_id = :id"),
text("DELETE FROM workspace_memberships WHERE workspace_id = :id"),
{"id": space_id},
)
await cleanup.execute(