当前客户端上没有定义池 - knex.js + node + postgresql

时间:2016-01-06 20:32:33

标签: node.js postgresql knex.js

我正在node.js中构建一个app并使用knex ORM。我无法运行迁移 - 我一直收到错误:

Error: There is no pool defined on the current client

这是我的连接配置:

module.exports = {
knex: require('knex')({
    client: 'pg',
    connection: {
        host: env.DB_HOST,
        user: env.DB_USER,
        password: env.DB_USER_PASSWORD,
        database: env.DB_NAME
    },
    pool: {
        min: 0,
        max: 7
    },
    searchPath: env.DB_SEARCHPATH
  })
};

有人可以帮忙吗?

提前致谢!

0 个答案:

没有答案