diff options
Diffstat (limited to 'lib/db')
| -rw-r--r-- | lib/db/bookshelf.js | 11 | ||||
| -rw-r--r-- | lib/db/index.js | 4 |
2 files changed, 6 insertions, 9 deletions
diff --git a/lib/db/bookshelf.js b/lib/db/bookshelf.js index 69157cc..1a2f609 100644 --- a/lib/db/bookshelf.js +++ b/lib/db/bookshelf.js @@ -6,13 +6,10 @@ var knex = require('knex')({ password : process.env.DB_PASS, database : process.env.DB_NAME, charset : 'utf8', - typecast : function (field, next) { - console.log(field.type) - if (field.type == 'BLOB') { - return field.string() - } - return next() - } + pool: { + min: 2, + max: 4 + }, } }) diff --git a/lib/db/index.js b/lib/db/index.js index 7bcb9ea..75ee2ad 100644 --- a/lib/db/index.js +++ b/lib/db/index.js @@ -28,5 +28,5 @@ db.getRandom = function () { } db.createImage = function(url){ - return new Image({ url: url, shorturl: "" }).save() -}
\ No newline at end of file + return new Image({ url: url }).save() +} |
