chore(migration): update migration files to enforce new publication mutation pattern

This commit is contained in:
Anish Sarkar 2026-05-12 17:31:49 +05:30
parent d923d34e38
commit c43bfdb1d9
5 changed files with 52 additions and 0 deletions

View file

@ -5,6 +5,17 @@ queries via Zero, instead of replicating all tables in public schema.
See: https://zero.rocicorp.dev/docs/zero-cache-config#app-publications
NOTE for future migration authors: this is the ONLY migration allowed
to use bare ``CREATE PUBLICATION``. All subsequent mutations of
``zero_publication`` MUST use the ``COMMENT ON PUBLICATION`` bookend
pattern wrapping an ``ALTER PUBLICATION ... SET TABLE`` -- copy the
``upgrade()`` function from migration
``143_force_zero_publication_resync.py`` as your starting template.
Raw ``DROP``/``CREATE PUBLICATION`` in new migrations would
re-introduce bug #1355 (zero-cache stuck on a stale replica snapshot
because Zero >= 1.0's change-streamer never sees the schema-change
event).
Revision ID: 116
Revises: 115
"""