diff --git a/content/posts/2018-06.md b/content/posts/2018-06.md index 6b26239db..301eb984f 100644 --- a/content/posts/2018-06.md +++ b/content/posts/2018-06.md @@ -235,7 +235,7 @@ UPDATE 1 $ dropdb -h localhost -U postgres dspacetest $ createdb -h localhost -U postgres -O dspacetest --encoding=UNICODE dspacetest $ psql -h localhost -U postgres dspacetest -c 'alter user dspacetest superuser;' -$ pg_restore -h localhost -U postgres -d dspacetest -O --role=dspacetest -W -h localhost /tmp/cgspace_2018-06-24.backup +$ pg_restore -h localhost -U postgres -d dspacetest -O --role=dspacetest -h localhost /tmp/cgspace_2018-06-24.backup $ psql -h localhost -U postgres dspacetest -c 'alter user dspacetest nosuperuser;' ``` @@ -251,5 +251,48 @@ $ psql -h localhost -U postgres dspacetest -c 'alter user dspacetest nosuperuser - The smaller instances get increased storage and network speed but I doubt many are actually using much of their current allocations so we probably don't need to bother with upgrading them - Last week Abenet asked if we could add `dc.language.iso` to the advanced search filters - There is already a search filter for this field defined in `discovery.xml` but we aren't using it, so I quickly enabled and tested it, then merged it to the `5_x-prod` branch ([#380](https://github.com/ilri/DSpace/pull/380)) +- Back to testing the DSpace 5.8 changes from Atmire, I had another issue with SQL migrations: + +``` +Caused by: org.flywaydb.core.api.FlywayException: Validate failed. Found differences between applied migrations and available migrations: Detected applied migration missing on the classpath: 5.8.2015.12.03.3 +``` + +- It took me a while to figure out that this migration is for MQM, which I removed after Atmire's original advice about the migrations so we actually need to delete this migration instead up updating it +- So I need to make sure to run the following during the DSpace 5.8 upgrade: + +``` +-- Delete existing CUA 4 migration if it exists +delete from schema_version where version = '5.6.2015.12.03.2'; + +-- Update version of CUA 4 migration +update schema_version set version = '5.6.2015.12.03.2' where version = '5.5.2015.12.03.2'; + +-- Delete MQM migration since we're no longer using it +delete from schema_version where version = '5.5.2015.12.03.3'; +``` + +- After that you can run the migrations manually and then DSpace should work fine: + +``` +$ ~/dspace/bin/dspace database migrate ignored +... +Done. +``` + +- Elizabeth from CIAT contacted me to ask if I could add ORCID identifiers to all of Andy Jarvis' items on CGSpace +- I used my [add-orcid-identifiers-csv.py](https://gist.githubusercontent.com/alanorth/a49d85cd9c5dea89cddbe809813a7050/raw/f67b6e45a9a940732882ae4bb26897a9b245ef31/add-orcid-identifiers-csv.py) script: + +``` +$ ./add-orcid-identifiers-csv.py -i 2018-06-24-andy-jarvis-orcid.csv -db dspacetest -u dspacetest -p 'fuuu' +``` + +- The contents of `2018-06-24-andy-jarvis-orcid.csv` were: + +``` +dc.contributor.author,cg.creator.id +"Jarvis, A.",Andy Jarvis: 0000-0001-6543-0798 +"Jarvis, Andy",Andy Jarvis: 0000-0001-6543-0798 +"Jarvis, Andrew",Andy Jarvis: 0000-0001-6543-0798 +``` diff --git a/docs/2018-06/index.html b/docs/2018-06/index.html index da05c51b2..df4ed31e9 100644 --- a/docs/2018-06/index.html +++ b/docs/2018-06/index.html @@ -41,7 +41,7 @@ sys 2m7.289s - + @@ -93,9 +93,9 @@ sys 2m7.289s "@type": "BlogPosting", "headline": "June, 2018", "url": "https://alanorth.github.io/cgspace-notes/2018-06/", - "wordCount": "2068", + "wordCount": "2280", "datePublished": "2018-06-04T19:49:54-07:00", - "dateModified": "2018-06-24T09:41:33+03:00", + "dateModified": "2018-06-24T13:37:43+03:00", "author": { "@type": "Person", "name": "Alan Orth" @@ -436,7 +436,7 @@ UPDATE 1
$ dropdb -h localhost -U postgres dspacetest
$ createdb -h localhost -U postgres -O dspacetest --encoding=UNICODE dspacetest
$ psql -h localhost -U postgres dspacetest -c 'alter user dspacetest superuser;'
-$ pg_restore -h localhost -U postgres -d dspacetest -O --role=dspacetest -W -h localhost /tmp/cgspace_2018-06-24.backup
+$ pg_restore -h localhost -U postgres -d dspacetest -O --role=dspacetest -h localhost /tmp/cgspace_2018-06-24.backup
$ psql -h localhost -U postgres dspacetest -c 'alter user dspacetest nosuperuser;'
@@ -453,8 +453,54 @@ $ psql -h localhost -U postgres dspacetest -c 'alter user dspacetest nosuperuser
dc.language.iso
to the advanced search filtersdiscovery.xml
but we aren’t using it, so I quickly enabled and tested it, then merged it to the 5_x-prod
branch (#380)Caused by: org.flywaydb.core.api.FlywayException: Validate failed. Found differences between applied migrations and available migrations: Detected applied migration missing on the classpath: 5.8.2015.12.03.3
+
+
+-- Delete existing CUA 4 migration if it exists
+delete from schema_version where version = '5.6.2015.12.03.2';
+
+-- Update version of CUA 4 migration
+update schema_version set version = '5.6.2015.12.03.2' where version = '5.5.2015.12.03.2';
+
+-- Delete MQM migration since we're no longer using it
+delete from schema_version where version = '5.5.2015.12.03.3';
+
+
+$ ~/dspace/bin/dspace database migrate ignored
+...
+Done.
+
+
+$ ./add-orcid-identifiers-csv.py -i 2018-06-24-andy-jarvis-orcid.csv -db dspacetest -u dspacetest -p 'fuuu'
+
+
+2018-06-24-andy-jarvis-orcid.csv
were:dc.contributor.author,cg.creator.id
+"Jarvis, A.",Andy Jarvis: 0000-0001-6543-0798
+"Jarvis, Andy",Andy Jarvis: 0000-0001-6543-0798
+"Jarvis, Andrew",Andy Jarvis: 0000-0001-6543-0798
+
+
diff --git a/docs/sitemap.xml b/docs/sitemap.xml
index ede90be9b..b355e85a5 100644
--- a/docs/sitemap.xml
+++ b/docs/sitemap.xml
@@ -4,7 +4,7 @@