大家使用 sequelize 的时候,什么时候调用 sync 方法呢?sync 返回的是个Promise,是不是后续所有关于 db 的操作都要放在 sync 后的 then 里面?这样感觉好不方便呀。
你可以将其重新封装一下,结果用回调函数返回,这个很简单的
按时as
@lumia2046 as 是啥?求指教。
sequelize.sync() will, based on your model definitions, create any missing tables. If force: true it will first drop tables before recreating them. api文档上已经说明了…
CNode 社区为国内最专业的 Node.js 开源技术社区,致力于 Node.js 的技术研究。
你可以将其重新封装一下,结果用回调函数返回,这个很简单的
按时as
@lumia2046 as 是啥?求指教。
sequelize.sync() will, based on your model definitions, create any missing tables. If force: true it will first drop tables before recreating them. api文档上已经说明了…