You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 18, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Sep 18, 2026. It is now read-only.
Schema: Change type column to NOT NULL with default '' #12
Our type column is nullable but core's is NOT NULL.
Current:
type varchar(20) DEFAULT NULL
Core (PR #11256):
type varchar(32) NOT NULL default ''
Why we made it nullable:
We tried to store awareness (type='awareness', one per room) and updates (type=NULL, many per room) in the same table using MySQL's UNIQUE constraint quirk (allows multiple NULL values).
Why core doesn't:
Core uses specific type values for all operations:
update - regular CRDT update
sync_step1 - sync initialization
sync_step2 - sync response
compaction - compacted state
No NULL types exist in core's design.
Fix:
type varchar(32) NOT NULL default ''
Migration consideration:
Our current NULL rows were a workaround for storing updates and awareness together. With Presence API handling awareness separately, all rows should have explicit types.
Core's type column distinguishes awareness (type='awareness') from CRDT updates (type='update'). We use type IS NULL because we ONLY store CRDT updates (awareness lives in wp_presence).
The NULL design avoids string comparisons and reserves the column for future expansion if needed.
Decision: Keep type varchar(20) DEFAULT NULL as-is. Core's NOT NULL default '' serves a different storage model.
Activity
josephfusco commentedon Aug 17, 2026
Core's type column distinguishes awareness (type='awareness') from CRDT updates (type='update'). We use
type IS NULLbecause we ONLY store CRDT updates (awareness lives in wp_presence).The NULL design avoids string comparisons and reserves the column for future expansion if needed.
Decision: Keep
type varchar(20) DEFAULT NULLas-is. Core'sNOT NULL default ''serves a different storage model.fix: strip closes clauses when generating readme.txt's changelog
fix: strip PR links from the generated readme.txt changelog
fix: strip PR links from the generated readme.txt changelog (#83)