Skip to content

Adopt an ORM #323

@SchaeStewart

Description

@SchaeStewart

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions