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 8685140 on 2026-09-13. Licensed under the Functional Source License (FSL-1.1-ALv2).
This commit is contained in:
ThreadCount
2026-09-13 11:09:20 +10:00
commit 822c0b7c0b
406 changed files with 47742 additions and 0 deletions
@@ -0,0 +1,18 @@
-- Mobile pack: photo attachments + delivery-round proof
CREATE TABLE "Photo" (
"id" TEXT NOT NULL,
"facilityId" TEXT NOT NULL,
"kind" TEXT NOT NULL,
"data" TEXT NOT NULL,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
CONSTRAINT "Photo_pkey" PRIMARY KEY ("id")
);
CREATE INDEX "Photo_facilityId_idx" ON "Photo"("facilityId");
ALTER TABLE "Photo" ADD CONSTRAINT "Photo_facilityId_fkey" FOREIGN KEY ("facilityId") REFERENCES "Facility"("id") ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE "Approval" ADD COLUMN "photoId" TEXT;
ALTER TABLE "Receipt" ADD COLUMN "photoId" TEXT;
ALTER TABLE "Issue" ADD COLUMN "returnPhotoId" TEXT;
ALTER TABLE "Pickup" ADD COLUMN "deliveredTo" TEXT NOT NULL DEFAULT '';
ALTER TABLE "Pickup" ADD COLUMN "sigId" TEXT;
ALTER TABLE "Pickup" ADD COLUMN "proofId" TEXT;
ALTER TABLE "Pickup" ADD COLUMN "deliveredRound" BOOLEAN NOT NULL DEFAULT false;