docs(db): tighten migration 170 docstring, move publication invariant to call site

Trim the header to a one-line summary and relocate the "never raw DROP/CREATE
PUBLICATION" invariant (bug #1355, migration 116) to the apply_publication call
site where a refactor would actually occur. Comment/docstring only; no behavior
change.
This commit is contained in:
CREDO23 2026-06-26 17:59:05 +02:00
parent 5090ed734d
commit 49d3001fbf

View file

@ -1,15 +1,8 @@
"""rename searchspace schema to workspace """rename searchspace schema to workspace
Physically renames the SearchSpace schema to WorkSpace: tables, the Renames the SearchSpace tables/columns/constraints/indexes/sequences to the
``search_space_id`` / ``owner_search_space_id`` columns, the named workspace_* names the ORM already declares, and reconciles the Zero publication
constraints/indexes/sequences that embed the old name, and the auto-named to match.
FK/PK/sequence objects. The Zero publication is reconciled to the renamed
``workspace_id`` column lists via the blessed ``apply_publication`` path
(never raw DROP/CREATE PUBLICATION -- see migration 116).
This is the existing-deployment upgrade path (chains after head 169). The
from-scratch ``alembic upgrade head`` path is a separate, pre-existing concern
(0_initial uses create_all of the current ORM); it is out of scope here.
Revision ID: 170 Revision ID: 170
Revises: 169 Revises: 169
@ -488,8 +481,9 @@ def upgrade() -> None:
for old, new in SEQUENCE_RENAMES: for old, new in SEQUENCE_RENAMES:
_rename_sequence(conn, old, new) _rename_sequence(conn, old, new)
# Reconcile to the new workspace_id shape (blessed SET TABLE path); no-op # Reconcile to the new workspace_id shape via the blessed apply_publication
# if the publication does not exist. # path (ALTER ... SET TABLE) -- never raw DROP/CREATE PUBLICATION (bug #1355,
# migration 116). No-op if the publication does not exist.
apply_publication(conn) apply_publication(conn)