const sequelize = require('../config/database') const EpidemicRecord = require('../models/EpidemicRecord') async function syncTable() { try { console.log('开始同步防疫记录表...') // 同步模型到数据库 await EpidemicRecord.sync({ force: true }) console.log('防疫记录表同步成功') } catch (error) { console.error('同步表失败:', error) } finally { process.exit(0) } } // 运行脚本 syncTable()