feat: 拉取最新仓库代码

Co-authored-by: traeagent <traeagent@users.noreply.github.com>
This commit is contained in:
gituib
2026-05-06 03:08:12 +00:00
co-authored by traeagent
parent a6af71ebe7
commit 5170c0ab6f
+4 -12
View File
@@ -96,18 +96,10 @@ async function syncBusinessModels() {
const DeviceBusiness = require('./models/DeviceBusiness'); const DeviceBusiness = require('./models/DeviceBusiness');
const Warehouse = require('./models/Warehouse'); const Warehouse = require('./models/Warehouse');
// 仅在开发环境使用 sync({ alter: true }),生产环境应使用 migrations await Business.sync();
if (process.env.NODE_ENV !== 'production') { await DeviceBusiness.sync();
await Business.sync({ alter: true }); await Warehouse.sync();
await DeviceBusiness.sync({ alter: true }); logger.info('业务/设备关联/库房模型同步完成');
await Warehouse.sync({ alter: true });
logger.info('业务/设备关联/库房模型同步完成(alter mode');
} else {
await Business.sync();
await DeviceBusiness.sync();
await Warehouse.sync();
logger.info('业务/设备关联/库房模型同步完成(safe mode');
}
} }
async function initDefaultSystemSettings() { async function initDefaultSystemSettings() {