Skip to content

Commit da82f2c

Browse files
committed
Added the mvp columns
1 parent 4477321 commit da82f2c

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

orcid-persistence/src/main/resources/db-master.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,4 +422,5 @@
422422
<include file="/db/updates/add_email_index_on_email_event_table.xml" />
423423
<include file="/db/updates/dw_add_featured_to_dw_org_affiliation_relation.xml" />
424424
<include file="/db/updates/add_indexes_on_profile_and_email_frequency.xml" />
425+
<include file="/db/updates/dw_client_details_with_mvp.xml" />
425426
</databaseChangeLog>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
2+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-2.0.xsd">
4+
5+
<!-- dw_client_details -->
6+
<changeSet id="ALTER-DW-CLIENT-DETAILS-VIEW-MVP" author="Camelia Dumitru" dbms="postgresql">
7+
<createView viewName="dw_client_details" replaceIfExists="true">
8+
select client_details_id, client_name, client_description, client_website, group_orcid,
9+
client_type, user_obo_enabled, date_created, last_modified, user_notification_enabled, notification_domains, notification_webpage_url
10+
from client_details where last_modified > date_trunc('day',(now() - interval '4 months'))
11+
</createView>
12+
</changeSet>
13+
14+
<changeSet id="GRANT-READ-TO-DW-USER-ON-DW-CLIENT_DETAILS_MVP" author="Camelia Dumitru" dbms="postgresql">
15+
<preConditions>
16+
<sqlCheck expectedResult="1">SELECT 1 FROM pg_roles WHERE rolname='dw_user'</sqlCheck>
17+
</preConditions>
18+
<sql>GRANT SELECT ON TABLE dw_client_details to dw_user;</sql>
19+
</changeSet>
20+
21+
</databaseChangeLog>

0 commit comments

Comments
 (0)