-
Notifications
You must be signed in to change notification settings - Fork 47
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
feat: init sequelize and pgsql #5
base: master
Are you sure you want to change the base?
feat: init sequelize and pgsql #5
Conversation
app/service/mysql.js
Outdated
const a = await this.consoleQuery(sql); | ||
const b = await this.app.model.query('SELECT * FROM user', { raw: true, type: this.app.model.QueryTypes.SELECT }); | ||
return { a, b }; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个方法没用到?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
finish fix
config/config.default.js
Outdated
port: 7092, | ||
username: 'postgres', | ||
password: 'LhXQaSzD', | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不要把你的配置暴露出来。。。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
finish fix
xtransit-manager 的 db service 的也来个 pr |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
建议使用可配置的方式,在部署的时候 ,可以自由选择数据库,而不是直接替换 mysql
。
将 app/service/mysql.js 改为 app/service/pgsql.js
,原 mysql.js
不变。
使用的地方,做个封装。
7cfb537
to
b08429f
Compare
将mysql改成了 sequelize
然后 增加了 pgsql 的init脚本