We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
用nodemon来重启代码。 每次同步(sequelize.sync)并设置了表的对应关系
// 设置模型关系 const Class = require("./Class") const Student = require("./Student") Class.hasMany(Student); Student.belongsTo(Class);
每次同步都会加一个外键
是不是同步在一个项目中只能同步一次啊
The text was updated successfully, but these errors were encountered:
.sync({force:true})
Sorry, something went wrong.
用这个每次重启代码 表数据全没了呀
@xiaojieajie sync function 用于model和table之间的首次映射补全,会自动创建database中不存在的table或column. 在init过程结束后,如无调整不应反复调用sync方法(尤其是当结构并无改变时).
@xiaojieajie sync function 用于model和table之间的_首次_映射补全,会自动创建database中不存在的table或column. 在init过程结束后,如无调整不应反复调用sync方法(尤其是当结构并无改变时).
好的 谢谢
No branches or pull requests
用nodemon来重启代码。
每次同步(sequelize.sync)并设置了表的对应关系
// 设置模型关系
const Class = require("./Class")
const Student = require("./Student")
Class.hasMany(Student);
Student.belongsTo(Class);
每次同步都会加一个外键
是不是同步在一个项目中只能同步一次啊
The text was updated successfully, but these errors were encountered: