Skip to content

Enforce the project health set in the database, not only at the API #412

Closed

Description

@imshashank

PROJECT_HEALTHS in packages/shared/src/constants/project.ts fixes health to on_track, at_risk, off_track and no_update, and the validators enforce it on every write. The columns themselves are still free text: health on project and on project_update in packages/db/src/schema/work.ts have no check constraint, so a direct write or a future importer can store anything.

Add a check constraint on both columns, generate the migration with drizzle-kit, and add a schema test that a value outside the set is refused. The migration must also be applied to the hosted database before the code ships, per the migrations note in CLAUDE.md.

Activity

  1. added
    good first issue
    help wanted
    ready
    area: database
    area: projects
    size: small
    points: 1
    schema change
    on Sep 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: databasearea: projectsgood first issuehelp wantedpoints: 1readyschema changesize: small

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions