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

Adopt an ORM #323

Open
SchaeStewart opened this issue Apr 9, 2022 · 0 comments
Open

Adopt an ORM #323

SchaeStewart opened this issue Apr 9, 2022 · 0 comments

Comments

@SchaeStewart
Copy link
Contributor

The project has grown a lot and so has the complexity of our SQL queries. Given the number of queries, and the amount of manual query building we are doing, I think we should adopt an ORM. This will make it easier for newer members to contribute, and hopefully will help reduce errors when writing and modifying queries.

I propose the following requirements for the ORM:

  • TypeScript support (see Migrate to TypeScript #322)
  • Query building
  • Escape hatch
    • (ability to write raw SQL if necessary)
  • (optional) migrations
    • (I don't have strong opinions around migrations, I'm okay to continue using node-pg-migrate, or adopt whatever the ORM recommends)

I've heard good things about Prisma and TypeORM, so unless someone has strong recommendations, we can start by looking into these.

Completion Criteria:

It doesn't have to happen in a single PR, but eventually we would migrate all hand rolled SQL to ORM queries

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

No branches or pull requests

1 participant