Manage the Slack digest in the admin
New settings area: the webhook lives in the database and is only shown shortened afterwards, the environment variable stays as a fallback. A switch decides whether internal entries travel, a button sends the digest right away, and every run is recorded with period, count, projects, result and who triggered it.
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
CREATE TABLE "app_setting" (
|
||||
"key" text PRIMARY KEY NOT NULL,
|
||||
"value" text NOT NULL,
|
||||
"updated_at" timestamp with time zone DEFAULT now() NOT NULL
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE TABLE "report_run" (
|
||||
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
|
||||
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
|
||||
"from_at" timestamp with time zone NOT NULL,
|
||||
"to_at" timestamp with time zone NOT NULL,
|
||||
"total" integer NOT NULL,
|
||||
"projects" jsonb DEFAULT '[]'::jsonb NOT NULL,
|
||||
"sent" boolean DEFAULT false NOT NULL,
|
||||
"trigger" text NOT NULL,
|
||||
"detail" text
|
||||
);
|
||||
Reference in New Issue
Block a user