mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-10 13:22:14 +00:00
The schedule tab shows its eras as a collapsible timeline — current plan since its date, predecessors with their times and span — and a past era can be added manually for old history, with validation against overlaps and the live plan. Invite creation chooses one to fifty uses and the redemption list scrolls.
20 lines
896 B
SQL
20 lines
896 B
SQL
-- v1.16.5 — schedule-revision provenance.
|
|
--
|
|
-- The Zeitplan tab now lets a user append a PRE-tracking era by hand
|
|
-- ("the medication dosed at 07:00/19:00 from March to June, before I
|
|
-- edited it here"). Those rows are user-entered, not write-path
|
|
-- archives, so they must stay deletable without touching the archive
|
|
-- the schedule-replace path mints.
|
|
--
|
|
-- `source` records the provenance:
|
|
-- 'ARCHIVED' — minted by the wholesale-replace write path (immutable
|
|
-- history; never deletable through the API).
|
|
-- 'MANUAL' — entered through POST
|
|
-- /api/medications/{id}/schedule-revisions (deletable by
|
|
-- the owner).
|
|
--
|
|
-- Additive + non-destructive: every existing row is a write-path
|
|
-- archive, so the default backfills correctly.
|
|
ALTER TABLE "medication_schedule_revisions"
|
|
ADD COLUMN "source" TEXT NOT NULL DEFAULT 'ARCHIVED';
|