diff options
Diffstat (limited to 'lib/db/bookshelf.js')
| -rw-r--r-- | lib/db/bookshelf.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/db/bookshelf.js b/lib/db/bookshelf.js index 5774120..69157cc 100644 --- a/lib/db/bookshelf.js +++ b/lib/db/bookshelf.js @@ -5,7 +5,14 @@ var knex = require('knex')({ user : process.env.DB_USER, password : process.env.DB_PASS, database : process.env.DB_NAME, - charset : 'utf8' + charset : 'utf8', + typecast : function (field, next) { + console.log(field.type) + if (field.type == 'BLOB') { + return field.string() + } + return next() + } } }) |
