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
egg官方配置 初始化 Migrations 并不会按照文档创建目录 https://eggjs.org/zh-cn/tutorials/sequelize.html
请使用 egg-init --type=simple bug 创建,并上传到你的 GitHub 仓库
egg-init --type=simple bug
https://github.com/YOUR_REPOSITORY_URL
按照官网配置 多次卸载安装 同样的问题
➜ sequelize-project npx sequelize init:config Sequelize CLI [Node: 9.2.0, CLI: 5.4.0, ORM: 4.42.0] Created "database/config.json" ➜ sequelize-project npx sequelize init:migrations Sequelize CLI [Node: 9.2.0, CLI: 5.4.0, ORM: 4.42.0] Successfully created migrations folder at "/Users/xiangyujie/code/sequelize-project/database/migrations".
The text was updated successfully, but these errors were encountered:
恩,此处的文档有问题,应该是可以直接 npx sequelize init ,感谢反馈。你可以先手动创建这几个目录。
npx sequelize init
Sorry, something went wrong.
我今天再试试 在我提issue之前 我手动创建了目录 但是不能读取到这个model
this.model.User
所以只能提issue 目前可以跑通 感谢🙏
生成的数据库配置目录 database/config.json 建议文档新增如果用户提示高版本禁用警告 建议新增 operatorsAliases:false 字段来跑通测试
今天按文档走的时候,执行那两个初始化指令。也没有按描述生成database/config.json和database/migrations。对比了sequelize官网migrations的文档后发现,猜测可能是path.join()和path.resolve()引起的坑。egg文档里的.sequelizerc里的用的path.join(),该方法碰到‘/’会认为是普通的目录层级连接符,resolve则会认为是根路径。前者返回多是相对路径,后者是绝对路径。 `'use strict';
const path = require('path');
module.exports = { config: path.join(__dirname, 'database/config.json'), 'migrations-path': path.join(__dirname, 'database/migrations'), 'seeders-path': path.join(__dirname, 'database/seeders'), 'models-path': path.join(__dirname, 'app/model'), };` 把上面的join改成resolve后,可按文档描述生成特定位置的文件和目录。
dead-horse
Successfully merging a pull request may close this issue.
What happens?
egg官方配置 初始化 Migrations 并不会按照文档创建目录
https://eggjs.org/zh-cn/tutorials/sequelize.html
最小可复现仓库
https://github.com/YOUR_REPOSITORY_URL
复现步骤,错误日志以及相关配置
按照官网配置 多次卸载安装 同样的问题
相关环境信息
The text was updated successfully, but these errors were encountered: