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-core directory in your git repo and run the following command.

mvn exec:java -Dexec.mainClass=org.orcid.core.cli.InitDb -Dorg.orcid.persistence.db.username=postgres -Dorg.orcid.persistence.db.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