ThinkJS supports PostgreSQL by using pg module in underlayer.
If you want to use PostgreSQL, you should change modle type to postgresql by modify src/common/config/db.js:
export default {
type: 'postgresql',
adapter: {
postgresql: {
}
}
}
PostgreSQL has same APIs with MySQL, you can know more in Model -> Description。