From 464e28ea25f33ad41c0ccfe5dd5e873d883dbbaa Mon Sep 17 00:00:00 2001 From: CREDO23 Date: Fri, 26 Jun 2026 16:56:39 +0200 Subject: [PATCH] refactor(db): publish workspace_id column in zero_publication Phase 1 (rename DB) commit 2: flip the search_space_id entries in the canonical Zero publication column lists (documents, automations, new_chat_threads, podcasts) to the renamed physical column workspace_id, so ALTER PUBLICATION ... SET TABLE matches the post-rename schema. No test references the publication shape; functional verification via `python -m app.zero_publication --verify` runs after migration 170 builds/renames the publication against a live DB. --- surfsense_backend/app/zero_publication.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/surfsense_backend/app/zero_publication.py b/surfsense_backend/app/zero_publication.py index c16f27087..574b570b8 100644 --- a/surfsense_backend/app/zero_publication.py +++ b/surfsense_backend/app/zero_publication.py @@ -28,7 +28,7 @@ DOCUMENT_COLS = [ "id", "title", "document_type", - "search_space_id", + "workspace_id", "folder_id", "created_by_id", "status", @@ -54,12 +54,12 @@ AUTOMATION_RUN_COLS = [ AUTOMATION_COLS = [ "id", - "search_space_id", + "workspace_id", ] NEW_CHAT_THREAD_COLS = [ "id", - "search_space_id", + "workspace_id", ] # Enough to drive the lifecycle UI by push: status, the reviewable brief, and @@ -73,7 +73,7 @@ PODCAST_COLS = [ "spec_version", "duration_seconds", "error", - "search_space_id", + "workspace_id", "thread_id", "created_at", ]