Permalink
Browse files

Merge pull request #1 from eguaj/1.1-A2971

Fixes for migration from platform 3.2 (closes #2971)
  • Loading branch information...
2 parents 2eb92dc + b905b6e commit 46d31613714d778752521e1b9e20d96a55f1218d @Eric-Brison committed Sep 6, 2012
Showing with 18 additions and 0 deletions.
  1. +1 −0 Class/Method.Thesaurus.php
  2. +17 −0 THESAURUS_premigr_1.1.0
@@ -79,6 +79,7 @@ function getSqlFilter($oa, $thv)
}
/**
* refresh relations from uri
+ * @apiExpose
*/
function refreshConcepts()
{
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+if [ -z "$pgservice_core" ]; then
+ echo "Undefined or empty pgservice_core!"
+ exit 1
+fi
+
+PGSERVICE="$pgservice_core" psql --set ON_ERROR_STOP=on -f - <<EOF
+BEGIN;
+UPDATE ONLY docattr SET type = 'enum' FROM docfam WHERE docfam.name = 'THESAURUS' AND docfam.id = docattr.docid AND docattr.id = 'thes_lang' AND docattr.type = 'enumlist';
+COMMIT;
+EOF
+RET=$?
+if [ $RET -ne 0 ]; then
+ echo "Error updating thesaurus attributes."
+ exit $RET
+fi

0 comments on commit 46d3161

Please sign in to comment.