ORCID/ORCID-Source — pull request #1140 by wjrsimpson (2014-05-28 19:32:17+00:00)
Title: Store work ext ids as json

VERY IMPORTANT!

Part of the database changeset needs to be run as postgres. Without this, Hibernate will not work with the json data type. To do this you must change to the orcid-persistence directory in your git repo and run the following command.

mvn liquibase:update -Dliquibase.changeLogFile=src/main/resources/db/updates/work-external-ids-as-json.xml -Dliquibase.username=postgres -Dliquibase.password=postgres

Also, to get the performance boost, all profiles need to be resaved. To do this first do a maven install from the top of your git repo.

mvn install -DskipTests

Then get a list of profiles that need resaving by running the following in psql.

copy (select distinct orcid from profile_work pw join work w on w.work_id = pw.work_id and w.external_ids_json is null join work_external_identifier wei on wei.work_id = w.work_id) to '/Users/willsimpson/tmp/profiles_to_save';

Then change to the orcid-core directory of your git repo, and run the following.

mvn exec:java -Dexec.mainClass=org.orcid.core.cli.ResaveProfiles -Dexec.args='-f /Users/willsimpson/tmp/profiles_to_save' -Dorg.orcid.config.file=classpath:staging-perstence.properties