我按照他们的迁移指南将 knex 从 0.21 更新到 0.95,现在我在 CI 运行时收到此错误npx knex migrate:latest
migration file "20191104160706_migrate-appsflyer_customers.js" failed
migration failed with error: The query is empty
at createQueryBuilder (/home/circleci/backend/node_modules/knex/lib/knex-builder/make-knex.js:313:26)
Run Code Online (Sandbox Code Playgroud)
但迁移文件包含查询的
async function up (knex) {
// language=Postgres
const { rows } = await knex.raw(`
SELECT * FROM appsflyer_customer;
`)
const mappedRows = rows.map(row => ({
user_id: row.user_id,
advertising_id_type: 'appsflyer',
advertising_id: row.appsflyer_device_id
}))
await knex('device_advertising_association')
.insert(mappedRows)
}
async function down (knex) {
await knex.raw(`
DELETE FROM device_advertising_association WHERE user_id NOTNULL;
`)
}
module.exports = …Run Code Online (Sandbox Code Playgroud)