-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
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
没有数据库文件吗 #1
Comments
启动egg.js服务,程序会自动创建数据库,自动同步,你只需要配置好数据库服务,在 // 模型添加字段同步数据库
app.beforeStart(async () => {
await app.model.sync({alter: true});//force false 为不覆盖 true会删除再创建; alter true可以 添加或删除字段;
}); |
表结构初始化完了但表数据为空,能不能也给个脚本初始化table data,menu和mock data对应起来的呢?谢谢大佬 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
没有数据库文件吗
The text was updated successfully, but these errors were encountered: