CREATE TABLE "activity_log" ( "id" text PRIMARY KEY NOT NULL, "organization_id" text NOT NULL, "actor_user_id" text NOT NULL, "actor_email" text NOT NULL, "action" text NOT NULL, "target_type" text, "target_id" text, "target_label" text, "metadata" text, "ip_address" text, "created_at" timestamp with time zone DEFAULT now() NOT NULL ); --> statement-breakpoint CREATE INDEX "activity_log_org_created_at_idx" ON "activity_log" USING btree ("organization_id","created_at");--> statement-breakpoint CREATE INDEX "activity_log_org_actor_idx" ON "activity_log" USING btree ("organization_id","actor_user_id");