egg
egg copied to clipboard
sequelize only migrate the first part of the configuration.
What happens?
执行npx sequelize db:migrate。但只在config的第一个database_development中生成了users表,其他两个数据库没有成功生成users表。
{
"development": {
"username": "root",
"password": null,
"database": "database_development",
"host": "127.0.0.1",
"dialect": "mysql"
},
"test": {
"username": "root",
"password": null,
"database": "database_test",
"host": "127.0.0.1",
"dialect": "mysql"
},
"production": {
"username": "root",
"password": null,
"database": "database_production",
"host": "127.0.0.1",
"dialect": "mysql"
}
}

Mini Showcase Repository(REQUIRED)
Provide a mini GitHub repository which can reproduce the issue. Use
npm init egg --type=simple bugthen upload to your GitHub
How To Reproduce
Steps to reproduce the behavior:
- 在
database/config.json中自动生成的配置, - 在MySQL中分别创建了这3个数据库
database_developmentdatabase_testdatabase_production, - 且在
database/migrations中自动生成了一个关于users的文件,配置后。 - 执行
npx sequelize db:migrate。但只在配置的第一个database_development中生成了users表,配置中的其他两个数据库没有成功生成users表。
Expected behavior
当然是期望3个数据库都成功生成users表。
Context
- Node Version: 16.13.1
- Egg Version: 2.15.1
- Plugin Name: egg-sequelize
- Plugin Version: 6.0.0
- Platform: win10 pro