From 38405ac7478bcf2a23b71e308125872778fc884d Mon Sep 17 00:00:00 2001 From: Dmitry Marakasov Date: Thu, 19 Dec 2024 23:00:05 +0300 Subject: [PATCH] Add number of reports into global and project statistics --- sql.d/schema/create_schema_tables.sql | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sql.d/schema/create_schema_tables.sql b/sql.d/schema/create_schema_tables.sql index 61d067c0..eb1ac8e1 100644 --- a/sql.d/schema/create_schema_tables.sql +++ b/sql.d/schema/create_schema_tables.sql @@ -85,6 +85,7 @@ CREATE TABLE metapackages ( has_related boolean NOT NULL DEFAULT false, has_cves boolean NOT NULL DEFAULT false, num_updates integer NOT NULL DEFAULT 0, + num_reports integer NOT NULL DEFAULT 0, first_seen timestamp with time zone NOT NULL DEFAULT now(), orphaned_at timestamp with time zone @@ -457,7 +458,9 @@ CREATE TABLE statistics ( num_metapackages integer NOT NULL DEFAULT 0, num_problems integer NOT NULL DEFAULT 0, num_maintainers integer NOT NULL DEFAULT 0, - num_urls_checked integer NOT NULL DEFAULT 0 + num_urls_checked integer NOT NULL DEFAULT 0, + num_reports_total integer NOT NULL DEFAULT 0, + num_reports_open integer NOT NULL DEFAULT 0 ); INSERT INTO statistics VALUES(DEFAULT);