Change eventlog db column types from JSON to TEXT

JSON type is only supported on oracle mysql and none of the features are
used
This commit is contained in:
Johannes Zellner
2017-07-31 09:44:28 +02:00
parent 0db4387013
commit a4dff215f1
4 changed files with 35 additions and 5 deletions

View File

@@ -20,10 +20,11 @@ var assert = require('assert'),
var EVENTLOGS_FIELDS = [ 'id', 'action', 'source', 'data', 'creationTime' ].join(',');
// until mysql module supports automatic type coercion
function postProcess(eventLog) {
// usually we have sourceJson and dataJson, however since this used to be the JSON data type, we don't
eventLog.source = safe.JSON.parse(eventLog.source);
eventLog.data = safe.JSON.parse(eventLog.data);
return eventLog;
}