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 a113353 on 2026-09-15. Licensed under the Functional Source License (FSL-1.1-ALv2).
This commit is contained in:
ThreadCount
2026-09-15 22:54:09 +10:00
commit a6f1059ddf
424 changed files with 53535 additions and 0 deletions
@@ -0,0 +1,20 @@
-- On-site checkout: the business details a facility types when it subscribes by card, the
-- cadence it chose, and when it agreed to the Terms, the Privacy Policy and the SLA.
ALTER TABLE "Facility" ADD COLUMN "billingLegalName" TEXT NOT NULL DEFAULT '',
ADD COLUMN "billingTaxId" TEXT NOT NULL DEFAULT '',
ADD COLUMN "billingAddress" JSONB,
ADD COLUMN "billingCountry" TEXT NOT NULL DEFAULT '',
ADD COLUMN "billingCadence" TEXT NOT NULL DEFAULT '',
ADD COLUMN "agreedTermsAt" TIMESTAMP(3),
ADD COLUMN "agreedPrivacyAt" TIMESTAMP(3),
ADD COLUMN "agreedSlaAt" TIMESTAMP(3),
ADD COLUMN "agreedVersion" TEXT NOT NULL DEFAULT '';
DO $$
BEGIN
IF NOT EXISTS (SELECT 1 FROM pg_roles WHERE rolname = 'ops_ro') THEN
RAISE NOTICE 'ops_ro does not exist — checkout grants skipped';
RETURN;
END IF;
GRANT SELECT ("billingCountry", "billingCadence", "agreedTermsAt", "agreedPrivacyAt", "agreedSlaAt", "agreedVersion") ON "Facility" TO ops_ro;
END $$;