Files
threadcount-community/prisma/migrations/20260905090000_contact_message/migration.sql
T
ThreadCount 822c0b7c0b 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).
2026-09-13 11:09:20 +10:00

21 lines
755 B
SQL

-- Public contact form submissions. Deliberately not linked to a Facility: whoever writes in
-- usually doesn't have an account yet.
CREATE TABLE "ContactMessage" (
"id" TEXT NOT NULL,
"name" TEXT NOT NULL,
"role" TEXT NOT NULL DEFAULT '',
"facility" TEXT NOT NULL DEFAULT '',
"email" TEXT NOT NULL,
"topic" TEXT NOT NULL DEFAULT '',
"slot" TEXT NOT NULL DEFAULT '',
"message" TEXT NOT NULL,
"ip" TEXT NOT NULL DEFAULT '',
"emailed" BOOLEAN NOT NULL DEFAULT false,
"handled" BOOLEAN NOT NULL DEFAULT false,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
CONSTRAINT "ContactMessage_pkey" PRIMARY KEY ("id")
);
CREATE INDEX "ContactMessage_createdAt_idx" ON "ContactMessage"("createdAt");