From 90b12f55281411cfbd527bdc67f18025ab3bbec3 Mon Sep 17 00:00:00 2001 From: amontenegro Date: Wed, 1 Nov 2023 08:48:26 -0600 Subject: [PATCH] Building patch v2.43.3_patch1 --- .../src/main/resources/db-master.xml | 1 + .../resources/db/updates/dw_alter_event.xml | 43 +++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 orcid-persistence/src/main/resources/db/updates/dw_alter_event.xml diff --git a/orcid-persistence/src/main/resources/db-master.xml b/orcid-persistence/src/main/resources/db-master.xml index 767611d7826..54c7c267f5e 100644 --- a/orcid-persistence/src/main/resources/db-master.xml +++ b/orcid-persistence/src/main/resources/db-master.xml @@ -376,4 +376,5 @@ + diff --git a/orcid-persistence/src/main/resources/db/updates/dw_alter_event.xml b/orcid-persistence/src/main/resources/db/updates/dw_alter_event.xml new file mode 100644 index 00000000000..d7b9c53608e --- /dev/null +++ b/orcid-persistence/src/main/resources/db/updates/dw_alter_event.xml @@ -0,0 +1,43 @@ + + + + + + + SELECT event_type, client_id, COUNT(id), DATE_TRUNC('day', date_created), DATE_TRUNC('day', date_created) as last_modified + FROM event + WHERE event_type != 'Public-Page' + GROUP BY event_type, client_id, DATE_TRUNC('day', date_created) + ORDER BY DATE_TRUNC('day', date_created) DESC; + + + + + + SELECT 1 FROM pg_roles WHERE rolname='dw_user' + + GRANT SELECT ON TABLE dw_event to dw_user; + + + + + + + SELECT event_type, public_page, COUNT(id), DATE_TRUNC('day', date_created), DATE_TRUNC('day', date_created) as last_modified + FROM event + WHERE event_type = 'Public-Page' + GROUP BY event_type, public_page, DATE_TRUNC('day', date_created) + ORDER BY DATE_TRUNC('day', date_created) DESC; + + + + + + SELECT 1 FROM pg_roles WHERE rolname='dw_user' + + GRANT SELECT ON TABLE dw_event_public_page to dw_user; + + +