📜  knex 在 docker compose 中迁移 - 任何代码示例

📅  最后修改于: 2022-03-11 14:56:41.596000             🧑  作者: Mango

代码示例1
simple command for handling migration using knex orm database

// my package.json add this

"knexrollmig": "npx migrate rollback && npx knex migrate:latest",
"start": "npm run knexrollmig && node dist/server.js"

// my docker-compose add this

command: sh -c "sleep 3 && npm start"