Files
buzz-sheet/drizzle/0053_woozy_callisto.sql
T
gunshiz 188cec9bda
CI / Verify (push) Successful in 2m2s
CI / Build immutable images and deploy (push) Successful in 2m47s
feat : copy buzzy audit logs
2026-09-27 17:00:25 +07:00

12 lines
563 B
SQL

CREATE TABLE "audit_log" (
"id" bigint PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "audit_log_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 9223372036854775807 START WITH 1 CACHE 1),
"author_id" text,
"author" text,
"text" text NOT NULL,
"details" jsonb DEFAULT '{}'::jsonb,
"time" timestamp with time zone DEFAULT now() NOT NULL
);
--> statement-breakpoint
CREATE INDEX "audit_log_time_idx" ON "audit_log" USING btree ("time","id");--> statement-breakpoint
CREATE INDEX "audit_log_author_time_idx" ON "audit_log" USING btree ("author_id","time");