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 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() {
|
||||||
|
|||||||
Reference in New Issue
Block a user