Skip to content

Commit

Permalink
Merge branch 'main' into UpdatesOnTheEmailVerificationEmails
Browse files Browse the repository at this point in the history
  • Loading branch information
leomendoza123 authored Nov 2, 2023
2 parents 7cf0676 + 2328f59 commit e4a0673
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 0 deletions.
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
## v2.44.3 - 2023-11-01

[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.44.2...v2.44.3)

- [#6924](https://github.com/ORCID/ORCID-Source/pull/6924): fix: Add missing `last_modified` in events view so panoply can run su…

### Fix

- Add missing `last_modified` in events view so panoply can run successfully

## v2.44.2 - 2023-10-31

[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.44.1...v2.44.2)

- [#6922](https://github.com/ORCID/ORCID-Source/pull/6922): fix: Add missing create event method for social sign in

### Fix

- Add missing togglz for events in social sign in
- Add missing create event method for social sign in

## v2.44.1 - 2023-10-31

[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.44.0...v2.44.1)
Expand Down
1 change: 1 addition & 0 deletions orcid-persistence/src/main/resources/db-master.xml
Original file line number Diff line number Diff line change
Expand Up @@ -377,4 +377,5 @@
<include file="/db/updates/create_event_table.xml" />
<include file="/db/updates/dw_event.xml" />
<include file="/db/updates/create_event_indexes.xml" />
<include file="/db/updates/dw_alter_event.xml" />
</databaseChangeLog>
43 changes: 43 additions & 0 deletions orcid-persistence/src/main/resources/db/updates/dw_alter_event.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-2.0.xsd">

<changeSet id="ALTER-DW-EVENT-VIEW-GROUP-BY-DAY-CLIENT_ID-AND-EVENT_TYPE" author="Daniel Palafox" dbms="postgresql">
<dropView viewName="dw_event"/>

<createView viewName="dw_event">
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;
</createView>
</changeSet>

<changeSet id="GRANT-READ-TO-DW_USER-TO-DW_EVENT-VIEW" author="Daniel Palafox" dbms="postgresql">
<preConditions>
<sqlCheck expectedResult="1">SELECT 1 FROM pg_roles WHERE rolname='dw_user'</sqlCheck>
</preConditions>
<sql>GRANT SELECT ON TABLE dw_event to dw_user;</sql>
</changeSet>

<changeSet id="ALTER-DW-EVENT-VIEW-GROUP-BY-PUBLIC-PAGE" author="Daniel Palafox" dbms="postgresql">
<dropView viewName="dw_event_public_page"/>

<createView viewName="dw_event_public_page">
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;
</createView>
</changeSet>

<changeSet id="GRANT-READ-TO-DW-EVENT-VIEW-GROUP-BY-PUBLIC-PAGE" author="Daniel Palafox" dbms="postgresql">
<preConditions>
<sqlCheck expectedResult="1">SELECT 1 FROM pg_roles WHERE rolname='dw_user'</sqlCheck>
</preConditions>
<sql>GRANT SELECT ON TABLE dw_event_public_page to dw_user;</sql>
</changeSet>

</databaseChangeLog>

0 comments on commit e4a0673

Please sign in to comment.