feat: 拉取最新仓库代码
Co-authored-by: traeagent <traeagent@users.noreply.github.com>
This commit is contained in:
+4
-12
@@ -96,18 +96,10 @@ async function syncBusinessModels() {
|
||||
const DeviceBusiness = require('./models/DeviceBusiness');
|
||||
const Warehouse = require('./models/Warehouse');
|
||||
|
||||
// 仅在开发环境使用 sync({ alter: true }),生产环境应使用 migrations
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
await Business.sync({ alter: true });
|
||||
await DeviceBusiness.sync({ alter: true });
|
||||
await Warehouse.sync({ alter: true });
|
||||
logger.info('业务/设备关联/库房模型同步完成(alter mode)');
|
||||
} else {
|
||||
await Business.sync();
|
||||
await DeviceBusiness.sync();
|
||||
await Warehouse.sync();
|
||||
logger.info('业务/设备关联/库房模型同步完成(safe mode)');
|
||||
}
|
||||
await Business.sync();
|
||||
await DeviceBusiness.sync();
|
||||
await Warehouse.sync();
|
||||
logger.info('业务/设备关联/库房模型同步完成');
|
||||
}
|
||||
|
||||
async function initDefaultSystemSettings() {
|
||||
|
||||
Reference in New Issue
Block a user