-
Notifications
You must be signed in to change notification settings - Fork 158
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added the profile email domain view, as well as fixed the notificatio…
…n view include (#7073)
- Loading branch information
1 parent
c9d9f39
commit a56f649
Showing
3 changed files
with
22 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
orcid-persistence/src/main/resources/db/updates/create_dw_profile_email_domain.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<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="CREATE-DW-PROFILE-EMAIL-DOMAIN" author="Camelia Dumitru" dbms="postgresql"> | ||
<createView viewName="dw_profile_email_domain" replaceIfExists="true"> | ||
select id as db_id, orcid, email_domain, visibility,date_created, last_modified from profile_email_domain where last_modified > date_trunc('day',(now() - interval '4 months')) | ||
</createView> | ||
</changeSet> | ||
|
||
<changeSet id="GRANT-READ_PERM-TO-DW-PROFILE-EMAIL-DOMAIN" author="Camelia Dumitru" dbms="postgresql"> | ||
<preConditions> | ||
<sqlCheck expectedResult="1">SELECT 1 FROM pg_roles WHERE rolname='dw_user'</sqlCheck> | ||
</preConditions> | ||
<sql>GRANT SELECT ON TABLE dw_profile_email_domain to dw_user;</sql> | ||
</changeSet> | ||
|
||
</databaseChangeLog> |