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
没有数据库文件吗
The text was updated successfully, but these errors were encountered:
启动egg.js服务,程序会自动创建数据库,自动同步,你只需要配置好数据库服务,在egg/app/router.js
egg/app/router.js
// 模型添加字段同步数据库 app.beforeStart(async () => { await app.model.sync({alter: true});//force false 为不覆盖 true会删除再创建; alter true可以 添加或删除字段; });
Sorry, something went wrong.
表结构初始化完了但表数据为空,能不能也给个脚本初始化table data,menu和mock data对应起来的呢?谢谢大佬
@alexnest 好的,我已经添加了用户表的测试数据,
cd /egg 目录下
cd /egg
先启动服务 npm run dev ,
npm run dev
然后生成假数据 npm run fake,
npm run fake
具体操作文档
No branches or pull requests
没有数据库文件吗
The text was updated successfully, but these errors were encountered: