Skip to content

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

@hyj1991 hyj1991 force-pushed the master branch 3 times, most recently from 7cfb537 to b08429f Compare September 4, 2020 06:26
@hyj1991 hyj1991 marked this pull request as draft June 25, 2021 03:57
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