## Description
Added the changes from move to pg script from the postgres branch to
keep in sync.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
## Summary by CodeRabbit
- **New Features**
- Enhanced data transformation process for improved compatibility with
Postgres.
- Introduced mapping for `_class` field to `type` field.
- **Bug Fixes**
- Improved handling of asynchronous operations during MongoDB client
instantiation.
- **Refactor**
- Clarified condition checks in data transformation logic for better
readability.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
<!-- This is an auto-generated comment: Cypress test results -->
> [!TIP]
> 🟢🟢🟢 All cypress tests have passed! 🎉🎉🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/11100769096>
> Commit: 46e043c998767acb456920f36459ae6f8968a267
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=11100769096&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Sanity`
> Spec:
> <hr>Mon, 30 Sep 2024 07:14:51 UTC
<!-- end of auto-generated comment: Cypress test results -->
/ok-to-test tags="@tag.Sanity"