执行 SELECT * FROM "migrations_state" WHERE "key" = 时出错:没有为参数 1 指定值。db-migrate
Error executing SELECT * FROM "migrations_state" WHERE "key" = ?: No value specified for parameter 1. db-migrate
[容器] 2021/09/30 02:06:18 运行 命令 db-migrate up
正在初始化驱动程序...
创建 table:migrations_state
执行错误 SELECT * FROM "migrations_state" WHERE "key" = ?: 没有为参数 1 指定值。
[错误] unhandledRejection
[错误] 类型错误:回调不是函数
在对象。 (/usr/local/lib/node_modules/db-migrate-pg-aurora/dist/AuroraDataApiDriver.js:617:29)
在步骤 (/usr/local/lib/node_modules/db-migrate-pg-aurora/dist/AuroraDataApiDriver.js:46:23)
在 Object.throw (/usr/local/lib/node_modules/db-migrate-pg-aurora/dist/AuroraDataApiDriver.js:27:53)
在被拒绝时(/usr/local/lib/node_modules/db-migrate-pg-aurora/dist/AuroraDataApiDriver.js:19:65)
在 tryCatcher (/usr/local/lib/node_modules/db-migrate-pg-aurora/node_modules/bluebird/js/release/util.js:16:23)
在 Promise._settlePromiseFromHandler (/usr/local/lib/node_modules/db-migrate-pg-aurora/node_modules/bluebird/js/release/promise.js:547:31)
在 Promise._settlePromise (/usr/local/lib/node_modules/db-migrate-pg-aurora/node_modules/bluebird/js/release/promise.js:604:18)
在 Promise._settlePromise0 (/usr/local/lib/node_modules/db-migrate-pg-aurora/node_modules/bluebird/js/release/promise.js:649:10)
在 Promise._settlePromises (/usr/local/lib/node_modules/db-migrate-pg-aurora/node_modules/bluebird/js/release/promise.js:725:18)
在 _drainQueueStep (/usr/local/lib/node_modules/db-migrate-pg-aurora/node_modules/bluebird/js/release/async.js:93:12)
在 _drainQueue (/usr/local/lib/node_modules/db-migrate-pg-aurora/node_modules/bluebird/js/release/async.js:86:9)
在 Async._drainQueues (/usr/local/lib/node_modules/db-migrate-pg-aurora/node_modules/bluebird/js/release/async.js:102:5)
在 Immediate.Async.drainQueues [as _onImmediate] (/usr/local/lib/node_modules/db-migrate-pg-aurora/node_modules/bluebird/js/release/async.js:15:14)
在 processImmediate (internal/timers.js:461:21)
[容器] 2021/09/30 02:06:20 命令未成功退出 db-migrate up 退出状态 1
[容器] 2021/09/30 02:06:20 阶段完成:构建状态:失败
[容器] 2021/09/30 02:06:20 阶段上下文状态代码:COMMAND_EXECUTION_ERROR 消息:执行命令时出错:db-migrate up。原因:退出状态 1
db-migrate
1.0
Beta 版导致问题,降级到 0.11.12
解决了问题
npm install --silent --no-progress -g db-migrate@0.11.12
[容器] 2021/09/30 02:06:18 运行 命令 db-migrate up
正在初始化驱动程序... 创建 table:migrations_state 执行错误 SELECT * FROM "migrations_state" WHERE "key" = ?: 没有为参数 1 指定值。
[错误] unhandledRejection [错误] 类型错误:回调不是函数 在对象。 (/usr/local/lib/node_modules/db-migrate-pg-aurora/dist/AuroraDataApiDriver.js:617:29) 在步骤 (/usr/local/lib/node_modules/db-migrate-pg-aurora/dist/AuroraDataApiDriver.js:46:23) 在 Object.throw (/usr/local/lib/node_modules/db-migrate-pg-aurora/dist/AuroraDataApiDriver.js:27:53) 在被拒绝时(/usr/local/lib/node_modules/db-migrate-pg-aurora/dist/AuroraDataApiDriver.js:19:65) 在 tryCatcher (/usr/local/lib/node_modules/db-migrate-pg-aurora/node_modules/bluebird/js/release/util.js:16:23) 在 Promise._settlePromiseFromHandler (/usr/local/lib/node_modules/db-migrate-pg-aurora/node_modules/bluebird/js/release/promise.js:547:31) 在 Promise._settlePromise (/usr/local/lib/node_modules/db-migrate-pg-aurora/node_modules/bluebird/js/release/promise.js:604:18) 在 Promise._settlePromise0 (/usr/local/lib/node_modules/db-migrate-pg-aurora/node_modules/bluebird/js/release/promise.js:649:10) 在 Promise._settlePromises (/usr/local/lib/node_modules/db-migrate-pg-aurora/node_modules/bluebird/js/release/promise.js:725:18) 在 _drainQueueStep (/usr/local/lib/node_modules/db-migrate-pg-aurora/node_modules/bluebird/js/release/async.js:93:12) 在 _drainQueue (/usr/local/lib/node_modules/db-migrate-pg-aurora/node_modules/bluebird/js/release/async.js:86:9) 在 Async._drainQueues (/usr/local/lib/node_modules/db-migrate-pg-aurora/node_modules/bluebird/js/release/async.js:102:5) 在 Immediate.Async.drainQueues [as _onImmediate] (/usr/local/lib/node_modules/db-migrate-pg-aurora/node_modules/bluebird/js/release/async.js:15:14) 在 processImmediate (internal/timers.js:461:21)
[容器] 2021/09/30 02:06:20 命令未成功退出 db-migrate up 退出状态 1 [容器] 2021/09/30 02:06:20 阶段完成:构建状态:失败
[容器] 2021/09/30 02:06:20 阶段上下文状态代码:COMMAND_EXECUTION_ERROR 消息:执行命令时出错:db-migrate up。原因:退出状态 1
db-migrate
1.0
Beta 版导致问题,降级到 0.11.12
解决了问题
npm install --silent --no-progress -g db-migrate@0.11.12