unit(D8): audit_log table + migration + audit-row builder (rule 12)
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
CREATE TABLE "audit_log" (
|
||||
"id" text PRIMARY KEY NOT NULL,
|
||||
"actor_id" text NOT NULL,
|
||||
"actor_ip_hash" text,
|
||||
"action" text NOT NULL,
|
||||
"entity_type" text NOT NULL,
|
||||
"entity_id" text,
|
||||
"before_json" text DEFAULT '' NOT NULL,
|
||||
"after_json" text DEFAULT '' NOT NULL,
|
||||
"created_at" timestamp with time zone DEFAULT now() NOT NULL
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE INDEX "audit_log_created_idx" ON "audit_log" USING btree ("created_at");
|
||||
Reference in New Issue
Block a user