-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
User Story
As a developer, I want database types to automatically regenerate when the schema changes
Description
Currently, we manually regenerate database types (db-types.d.ts) for each lambda when the database schema changes. This is error-prone and easy to forget, leading to type mismatches between our code and the actual database schema.
This ticket is to set up CI/CD that automatically regenerates the db-types.d.ts file for every lambda whenever the database schema changes.
Acceptance criteria
- Create GitHub Actions workflow that triggers on changes to
apps/backend/db/db_setup.sql - Workflow runs kysely-codegen to regenerate types for all lambdas (users, projects, donors, expenditures, reports, auth)
- Generated
db-types.d.tsfiles are committed back to the repository automatically - Workflow fails if there are type generation errors
- Test the workflow by making a schema change and verifying types are regenerated
- Document process in
apps/backend/db/README.md