mirror of
https://github.com/alanorth/cgspace-notes.git
synced 2025-01-27 05:49:12 +01:00
Update notes for 2016-07-01
This commit is contained in:
@ -279,7 +279,7 @@ $ ./delete-metadata-values.py -f dc.contributor.corporate -i Corporate-Authors-D
|
||||
- Wow, there are 95 authors in the database who have ',' at the end of their name:
|
||||
|
||||
```
|
||||
#select text_value from metadatavalue where metadata_field_id=3 and text_value like '%,';
|
||||
# select text_value from metadatavalue where metadata_field_id=3 and text_value like '%,';
|
||||
```
|
||||
|
||||
- We need to use something like this to fix them, need to write a proper regex later:
|
||||
|
@ -9,3 +9,13 @@ image = "../images/bg.jpg"
|
||||
## 2016-07-01
|
||||
|
||||
- Add `dc.description.sponsorship` to Discovery sidebar facets and make investors clickable in item view ([#232](https://github.com/ilri/DSpace/issues/232))
|
||||
- I think this query should find and replace all authors that have "," at the end of their names (there were 95 matching the select before):
|
||||
|
||||
```
|
||||
dspacetest=# update metadatavalue set text_value = regexp_replace(text_value, '(^.+?),$', '\1') where metadata_field_id=3 and text_value ~ '^.+?,$';
|
||||
UPDATE 95
|
||||
dspacetest=# select text_value from metadatavalue where metadata_field_id=3 and text_value ~ '^.+?,$';
|
||||
text_value
|
||||
------------
|
||||
(0 rows)
|
||||
```
|
||||
|
Reference in New Issue
Block a user