Skip to content

Schema drift: claimTokenHash/claimTokenExpiresAt missing from Prisma schema #47

Description

@projectamazonph

Problem

src/app/actions/auth.ts references claimTokenHash and claimTokenExpiresAt on the User model, and imports hashClaimToken / PLACEHOLDER_PASSWORD_PREFIX from @/lib/claim-token. However, prisma/schema.prisma does not define these fields on the User model.

This means either:

  • The schema is out of sync with the code (build will fail on prisma generate), or
  • A migration added these fields but the schema file wasn't updated.

Impact

If the schema is genuinely missing these fields, this is a build-breaking driftprisma generate and any query referencing these columns will fail.

Action

  1. Check if a migration exists that adds claimTokenHash and claimTokenExpiresAt to the users table.
  2. If yes: update schema.prisma to match.
  3. If no: add the fields to the schema and create a migration.
  4. Verify pnpm prisma generate succeeds.

References

  • src/app/actions/auth.ts lines ~45-90 (signup claim flow)
  • src/lib/claim-token.ts (imported but not in schema)
  • pr/schema.prisma User model (lines 22-75)

Severity: Required — potential build breaker

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions