Skip to content
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

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

bianbiandashen
Copy link

将mysql改成了 sequelize
然后 增加了 pgsql 的init脚本

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 };
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个方法没用到?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

finish fix

port: 7092,
username: 'postgres',
password: 'LhXQaSzD',
};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不要把你的配置暴露出来。。。

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

finish fix

@hyj1991
Copy link
Member

hyj1991 commented Jun 30, 2020

xtransit-manager 的 db service 的也来个 pr

@hyj1991 hyj1991 self-requested a review June 30, 2020 08:05
Copy link

@clChenLiang clChenLiang left a 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 不变。
使用的地方,做个封装。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants