feat(server): kysely infrastructure setup + 4 repo migrations#1787
Open
Falinor wants to merge 7 commits into
Open
feat(server): kysely infrastructure setup + 4 repo migrations#1787Falinor wants to merge 7 commits into
Falinor wants to merge 7 commits into
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…support Replace Knex query builder with Kysely for find/link/linkMany operations. Re-export legacy Knex accessors (Precisions, HousingPrecisions) and the snake_case HousingPrecisionDBO type for backward compatibility with seeds and other test files. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
|
Override PG DATE columns (birth_date, start_date, end_date, dpe_date_at) to return "YYYY-MM-DD" strings via a pg type parser, avoiding the day-shift that occurs when node-postgres constructs a Date in the local timezone (CET). The hand-maintained db-types.ts layer sits on top of the auto-generated db.d.ts so re-running kysely-codegen never overwrites the corrections. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
db.d.ts(51 tables, snake_case).kysely-codegenrc.jsonwithcamelCase: falseto use snake_case column names matching actual database schemacodegentarget (depends onmigrate) toserver/project.jsonkysely-transaction.ts):startKyselyTransaction,getKyselyTransaction,withinKyselyTransactionusing AsyncLocalStorage — mirrors existingtransaction.tspatternsettingsRepository,resetLinkRepository,signupLinkRepository,precisionRepositoryto Kysely with snake_case column names*DBOtype exports as aliases forSelectable<DB[...]>for backward compat with callersTest plan
yarn nx test serverpasses (1038 tests passing, 2 unrelated failures in user-api.test.ts)yarn nx run-many -t typecheckpassessettingsRepository.test.ts: findOne and upsert (including conflict update)resetLinkRepository.test.ts: insert, get, usedsignupLinkRepository.test.ts: insert, get, getByEmail, usedprecisionRepository.test.ts: link (replaces, removes), linkMany (replaces across housings)🤖 Generated with Claude Code