Skip to article
Documentation

drizzle/0001_abandoned_richard_fisk.sql

Linked repository file from this build.

CREATE TABLE "inbox_events" (
	"id" text PRIMARY KEY NOT NULL,
	"review_number" text NOT NULL,
	"staff_id" text NOT NULL,
	"kind" text NOT NULL,
	"actor_role" text NOT NULL,
	"created_at" timestamp with time zone NOT NULL,
	"read_at" timestamp with time zone
);
--> statement-breakpoint
CREATE TABLE "inbox_visits" (
	"staff_id" text PRIMARY KEY NOT NULL,
	"last_seen_at" timestamp with time zone NOT NULL
);
--> statement-breakpoint
CREATE TABLE "review_index" (
	"review_number" text PRIMARY KEY NOT NULL,
	"case_number" text NOT NULL,
	"client_name" text NOT NULL,
	"examiner" text NOT NULL,
	"supervisor" text NOT NULL,
	"program" text NOT NULL,
	"sample_month" text NOT NULL,
	"state" text NOT NULL,
	"outcome" text NOT NULL,
	"appointment" text,
	"opened_at" timestamp with time zone,
	"version" integer NOT NULL
);
--> statement-breakpoint
CREATE TABLE "review_touches" (
	"staff_id" text NOT NULL,
	"review_number" text NOT NULL,
	"touched_at" timestamp with time zone NOT NULL,
	CONSTRAINT "review_touches_staff_id_review_number_pk" PRIMARY KEY("staff_id","review_number")
);