Skip to content

[Gel]: Add support for Gel-only column types in drizzle-zod/-arktype/-valibot/-typebox#6033

Open
allocsys wants to merge 1 commit into
drizzle-team:mainfrom
allocsys:main
Open

[Gel]: Add support for Gel-only column types in drizzle-zod/-arktype/-valibot/-typebox#6033
allocsys wants to merge 1 commit into
drizzle-team:mainfrom
allocsys:main

Conversation

@allocsys

Copy link
Copy Markdown

What

Adds real schema validation for the 6 Gel-only column types across the four schema-integration packages: dateDuration, duration, relDuration, localDate, localTime, localDateTime.

Previously, these types fell through to a permissive any-type schema in drizzle-zod, drizzle-arktype, drizzle-valibot, and drizzle-typebox, so schemas generated for Gel tables silently skipped validation on these columns.

Changes

  • Add real schema validation for the 6 Gel-only column types in drizzle-zod, drizzle-arktype, drizzle-valibot, and drizzle-typebox
  • Add gel as an optional peerDependency and devDependency in each of the 4 packages
  • drizzle-arktype: use 6 concrete per-type schemas instead of a generic instanceof-based schema, since arktype's validateChainedAsArgs type check rejects the generic form
  • Add tests per package verifying the new schemas accept real Gel instances and reject non-matching values

Testing

Added tests/gel.test.ts in each of the 4 packages, covering both acceptance of real Gel instances and rejection of non-matching values for all 6 new column types.

Notes for reviewers

  • This PR spans 4 packages rather than a single dialect, so I've titled it after the underlying driver (Gel) per the [<dialect name>]: <subject> convention rather than a specific package name.
  • Commit is signed per the contribution guidelines.

…-valibot/-typebox

Previously, the 6 Gel-only column types (dateDuration, duration,
relDuration, localDate, localTime, localDateTime) fell through to a
permissive any-type schema in all four schema-integration packages,
so schemas generated for Gel tables silently skipped validation on
these columns.

- Add real schema validation for the 6 Gel-only column types in
  drizzle-zod, drizzle-arktype, drizzle-valibot, and drizzle-typebox
- Add gel as an optional peerDependency and devDependency in each
  of the 4 packages
- drizzle-arktype: use 6 concrete per-type schemas instead of a
  generic instanceof-based schema, since arktype's
  validateChainedAsArgs type check rejects the generic form
- Add tests per package verifying the new schemas accept real Gel
  instances and reject non-matching values
@allocsys
allocsys marked this pull request as ready for review July 18, 2026 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant