Skip to content

Commit

Permalink
Add r ai d identifier (#7044)
Browse files Browse the repository at this point in the history
* Deactivated records should get 409 on GET requests

* Add RAiD identifier

* Fix unit tests

* Fix unit tests
  • Loading branch information
amontenegro authored Jun 19, 2024
1 parent b525897 commit 2988405
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@ org.orcid.jaxb.model.record.WorkExternalIdentifierType.proposal-id=Proposal ID
org.orcid.jaxb.model.record.WorkExternalIdentifierType.cstr=cstr\: Science and technology resource identification
org.orcid.jaxb.model.record.WorkExternalIdentifierType.k10plus=k10plus\: K10plus
org.orcid.jaxb.model.record.WorkExternalIdentifierType.cgn=cgn\: Culturegraph Number

org.orcid.jaxb.model.record.WorkExternalIdentifierType.raid=raid\: RAiD is an identifier for research projects and sub-projects or activies within such projects.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public void after() {
@Test
public void test0FetchEntities(){
Map<String,IdentifierType> map = idTypeMan.fetchIdentifierTypesByAPITypeName(null);
assertEquals(42+v2Ids.size(), map.size());
assertEquals(43+v2Ids.size(), map.size());
checkExists(map,"other-id");
for (String id : v2Ids){
checkExists(map, id);
Expand Down
4 changes: 3 additions & 1 deletion orcid-persistence/src/main/resources/db-master.xml
Original file line number Diff line number Diff line change
Expand Up @@ -388,5 +388,7 @@
<include file="/db/updates/add_ip_col_in_events.xml" />
<include file="/db/updates/alter_ip_col_in_events.xml" />
<include file="/db/updates/dw_papi_event_stats.xml" />
<include file="/db/updates/org_disambiguated_extra_columns.xml" />
<include file="/db/updates/org_disambiguated_extra_columns.xml" />
<include file="/db/updates/varchar_to_text_hsqldb.xml" />
<include file="/db/updates/identifier-types/identifier-type-52-RAiD.xml" />
</databaseChangeLog>
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<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 author="Angel Montenegro" id="ADD_RAID_IDENTIFIER_TYPE">
<preConditions onFail="MARK_RAN">
<sqlCheck expectedResult="0">select count(*) from identifier_type where id_name='RAiD';</sqlCheck>
</preConditions>
<sql>INSERT INTO identifier_type (id, id_name, id_resolution_prefix, id_deprecated, date_created, last_modified, primary_use) VALUES (52, 'RAiD', 'https://raid.org/', false, now(), now(), 'professional-activities');</sql>
<sql>UPDATE identifier_type SET "case_sensitive" = false WHERE id_name = 'RAiD';</sql>
</changeSet>
</databaseChangeLog>
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<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="HSQLDB-Update-Identifier-type" author="Angel Montenegro" dbms="hsqldb">
<sql>ALTER TABLE identifier_type ALTER COLUMN primary_use varchar(1000);</sql>
</changeSet>

</databaseChangeLog>

0 comments on commit 2988405

Please sign in to comment.