Update notes for 2017-02-16

This commit is contained in:
2017-02-16 19:31:01 +02:00
parent 47684f110c
commit beaf2c0d81
5 changed files with 59 additions and 4 deletions

View File

@ -134,7 +134,18 @@ UPDATE 58193
<ul>
<li>Seems to work fine!</li>
&lt;/ul&gt;</description>
&lt;li&gt;I noticed a few items that have incorrect DOI links (&lt;code&gt;dc.identifier.doi&lt;/code&gt;), and after looking in the database I see there are over 100 that are missing the scheme or are just plain wrong:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;dspace=# select distinct text_value from metadatavalue where resource_type_id=2 and metadata_field_id=220 and text_value not like &#39;http%://%&#39;;
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;This will replace any that begin with &lt;code&gt;10.&lt;/code&gt;:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;dspace=# update metadatavalue set text_value = regexp_replace(text_value, &#39;(^10\..+$)&#39;, &#39;https://dx.doi.org/\1&#39;) where metadata_field_id IN (select metadata_field_id from metadatafieldregistry where element = &#39;identifier&#39; and qualifier = &#39;doi&#39;) and text_value like &#39;10.%&#39;;
&lt;/code&gt;&lt;/pre&gt;</description>
</item>
<item>