Skip to content

Commit

Permalink
Added unique constraint for external id identifier for disambiguated org
Browse files Browse the repository at this point in the history
  • Loading branch information
Camelia-Orcid committed Aug 27, 2024
1 parent 50850de commit faf82a3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
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 @@ -403,4 +403,5 @@
<include file="/db/updates/create_profile_email_domain_table.xml" />
<include file="/db/updates/create_dw_notification.xml" />
<include file="/db/updates/create_dw_profile_email_domain.xml" />
<include file="/db/updates/add_unique_constraint_external_id_disambiguated_org.xml" />
</databaseChangeLog>
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<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="ADD-UNIQUE-CONSTRAINT-EXTID-DISAMBIGUATED-ORG" author="Camelia Dumitru" dbms="postgresql">
<addUniqueConstraint
columnNames="org_disambiguated_id, identifier, identifier_type"
tableName="org_disambiguated_external_identifier"
constraintName="uq_org_disambiguated_identifier_type"/>
</changeSet>

</databaseChangeLog>

0 comments on commit faf82a3

Please sign in to comment.