From 22a4819f363c12fbe64613d4eaead09043d0fdac Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Wed, 13 Jun 2018 09:22:58 +0300 Subject: [PATCH] Add notes for 2018-06-13 --- content/posts/2018-06.md | 35 +++++++++++++++++++++++++++++- docs/2018-06/index.html | 46 +++++++++++++++++++++++++++++++++++----- docs/sitemap.xml | 10 ++++----- 3 files changed, 80 insertions(+), 11 deletions(-) diff --git a/content/posts/2018-06.md b/content/posts/2018-06.md index 1fcb1cbb5..c77a20625 100644 --- a/content/posts/2018-06.md +++ b/content/posts/2018-06.md @@ -186,5 +186,38 @@ or( - https://dspacetest.cgiar.org/10568/96141 - https://dspacetest.cgiar.org/10568/96118 - https://dspacetest.cgiar.org/10568/96113 - + +## 2018-06-13 + +- Elizabeth from CIAT contacted me to ask if I could add ORCID identifiers to all of Robin Buruchara's items +- 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-13-Robin-Buruchara.csv -db dspace -u dspace -p 'fuuu' +``` + +- The contents of `2018-06-13-Robin-Buruchara.csv` were: + +``` +dc.contributor.author,cg.creator.id +"Buruchara, Robin",Robin Buruchara: 0000-0003-0934-1218 +"Buruchara, Robin A.",Robin Buruchara: 0000-0003-0934-1218 +``` + +- On a hunch I checked to see if CGSpace's bitstream cleanup was working properly and of course it's broken: + +``` +$ dspace cleanup -v +... +Error: ERROR: update or delete on table "bitstream" violates foreign key constraint "bundle_primary_bitstream_id_fkey" on table "bundle" + Detail: Key (bitstream_id)=(152402) is still referenced from table "bundle". +``` + +- As always, the solution is to delete that ID manually in PostgreSQL: + +``` +$ psql dspace -c 'update bundle set primary_bitstream_id=NULL where primary_bitstream_id in (152402);' +UPDATE 1 +``` + # vim: set sw=2 ts=2: diff --git a/docs/2018-06/index.html b/docs/2018-06/index.html index 16820668a..a9a8aee49 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": "1462", + "wordCount": "1587", "datePublished": "2018-06-04T19:49:54-07:00", - "dateModified": "2018-06-11T15:21:14+03:00", + "dateModified": "2018-06-12T10:42:43+03:00", "author": { "@type": "Person", "name": "Alan Orth" @@ -377,11 +377,47 @@ Failed to startup the DSpace Service Manager: failure starting up spring service
  • https://dspacetest.cgiar.org/10568/96184
  • https://dspacetest.cgiar.org/10568/96141
  • https://dspacetest.cgiar.org/10568/96118
  • -
  • https://dspacetest.cgiar.org/10568/96113 -
  • +
  • https://dspacetest.cgiar.org/10568/96113
  • +

    2018-06-13

    + + + +
    $ ./add-orcid-identifiers-csv.py -i 2018-06-13-Robin-Buruchara.csv -db dspace -u dspace -p 'fuuu'
    +
    + + + +
    dc.contributor.author,cg.creator.id
    +"Buruchara, Robin",Robin Buruchara: 0000-0003-0934-1218
    +"Buruchara, Robin A.",Robin Buruchara: 0000-0003-0934-1218
    +
    + + + +
    $ dspace cleanup -v
    +...
    +Error: ERROR: update or delete on table "bitstream" violates foreign key constraint "bundle_primary_bitstream_id_fkey" on table "bundle"
    +  Detail: Key (bitstream_id)=(152402) is still referenced from table "bundle".
    +
    + + + +
    $ psql dspace -c 'update bundle set primary_bitstream_id=NULL where primary_bitstream_id in (152402);'
    +UPDATE 1
    +
    +

    vim: set sw=2 ts=2:

    diff --git a/docs/sitemap.xml b/docs/sitemap.xml index 16cf360b9..c8353346f 100644 --- a/docs/sitemap.xml +++ b/docs/sitemap.xml @@ -4,7 +4,7 @@ https://alanorth.github.io/cgspace-notes/2018-06/ - 2018-06-11T15:21:14+03:00 + 2018-06-12T10:42:43+03:00 @@ -169,7 +169,7 @@ https://alanorth.github.io/cgspace-notes/ - 2018-06-11T15:21:14+03:00 + 2018-06-12T10:42:43+03:00 0 @@ -180,7 +180,7 @@ https://alanorth.github.io/cgspace-notes/tags/notes/ - 2018-06-11T15:21:14+03:00 + 2018-06-12T10:42:43+03:00 0 @@ -192,13 +192,13 @@ https://alanorth.github.io/cgspace-notes/posts/ - 2018-06-11T15:21:14+03:00 + 2018-06-12T10:42:43+03:00 0 https://alanorth.github.io/cgspace-notes/tags/ - 2018-06-11T15:21:14+03:00 + 2018-06-12T10:42:43+03:00 0