ProficientNowTechRFCs
Product RFCs/DB Ops/RFC DBOPS 0002

7. Future Considerations

RFC-DBOPS-0002                                                    Section 7
Category: Standards Track                           Future Considerations

7.1 Future Considerations

The following considerations apply to the evolution of the query layer after the Prisma-to-Kysely migration is completed:

ConsiderationRecommendationRationale
Full Prisma Client removalSHOULDAfter all tenant SQL endpoints are migrated and validated, the TenantPrismaClient dependency, PrismaManager client cache, and Prisma Engine binary SHOULD be removed to eliminate dead code and reduce footprint
ATS-main database migrationMAYThe AtsPrismaClient for the ATS-main database MAY be evaluated for Kysely migration in a separate RFC if similar overhead is observed
Kysely type generation pipelineSHOULDA build-time type generation step SHOULD be formalized to derive Kysely database interface types from the Prisma schema or database introspection, preventing schema drift
Shared query composition utilitiesSHOULDCommon query patterns (pagination, dynamic filtering, sorting, tenant scoping) SHOULD be extracted into shared utilities within @pnats/schema-manager to reduce per-module duplication
Connection pool monitoringSHOULDThe shared pg.Pool SHOULD expose metrics (active connections, idle connections, wait queue depth) for observability and capacity planning
Prisma Migrate replacementMAYIf Prisma Migrate's dependency on the Prisma schema becomes a maintenance burden after query-layer migration, an alternative migration tool MAY be evaluated in a separate RFC
MongoDB client evaluationMAYMongoDB Prisma clients are unaffected by this RFC; a separate evaluation MAY determine whether alternative MongoDB drivers provide similar benefits
Performance regression testingSHOULDAutomated performance benchmarks SHOULD be integrated into the CI pipeline to detect query-layer regressions as endpoints are migrated

On this page