Schema 1.4.0: drop meta.sessions.json

The definition string is the only stored schedule. The "json" column held a
parsed copy that the Python client wrote, the C++ client never wrote, and
neither client read -- and a raw UPDATE of one field silently left two
different schedules. Clients derive the parsed form from the definition.
09_schema_check.sql no longer expects the column; VERSION and
10_schema_version.sql at 1.4.0. Re-provision databases (no migrations).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
peter 2026-10-06 22:42:39 +01:00
parent 738fe0fe2d
commit cddaec5730
4 changed files with 6 additions and 4 deletions

View file

@ -128,10 +128,13 @@ CREATE TABLE meta.series (
needs_reindex boolean NOT NULL DEFAULT false
);
-- A session's schedule is its definition string, nothing else. (Until 1.4.0
-- a parsed copy was also stored in a "json" column; nothing read it, the C++
-- client never wrote it, and it could silently disagree with the definition.
-- Clients derive the parsed form from the definition when they need it.)
CREATE TABLE meta.sessions (
name character varying(50) NOT NULL,
definition text NOT NULL,
"json" text,
exchange_id character varying(12) NOT NULL
);

View file

@ -170,7 +170,6 @@ BEGIN
('meta.series', 'needs_reindex', 'boolean', true),
('meta.sessions', 'name', 'character varying(50)', true),
('meta.sessions', 'definition', 'text', true),
('meta.sessions', 'json', 'text', false),
('meta.sessions', 'exchange_id', 'character varying(12)', true),
('meta.timezones', 'iana_name', 'character varying(50)', true),
('meta.timezones', 'display_name', 'character varying(100)', true),

View file

@ -5,4 +5,4 @@
-- they were built for (Python: DB_SCHEMA_VERSION in tsapi_pgdb/_version.py).
INSERT INTO meta.schema_version (version, description)
VALUES ('1.3.0', 'meta.find_series_registry_mismatches()');
VALUES ('1.4.0', 'meta.sessions.json dropped: the definition is the only schedule');