Files
threadcount-community/prisma/migrations/20260909005105_facility_rev/migration.sql
T
ThreadCount 057da00fd2 ThreadCount Community edition
Uniform stock management for healthcare linen rooms: the coordinator app, the phone counter and the staff app, for your own server. Built from e2d6d42 on 2026-09-13. Licensed under the Functional Source License (FSL-1.1-ALv2).
2026-09-13 11:16:36 +10:00

7 lines
439 B
SQL

-- A counter the screens can poll to find out that somebody else changed something.
--
-- Cheap on purpose: one integer on a row every device already looks up by primary key. The
-- alternative was re-reading the facility's whole snapshot on a timer to spot a difference, which
-- on a ward phone is the entire catalogue every few seconds to learn that nothing happened.
ALTER TABLE "Facility" ADD COLUMN "rev" INTEGER NOT NULL DEFAULT 0;