drizzle-team / drizzle-team/drizzle-orm

[BUG]: DatabaseErrorException: ERROR: column "due_date" is of type timestamp without time zone but expression is of type text; Hint: You will need to rewrite or cast the expression.

Open
#2,232 5 comments 2 reactions 0 assignees View on GitHub
bug driver/aws-data-api priority qb/crud
Dominant language
TypeScript
Stars
35.8k
Forks
1.6k
Avg merge
2d 7h
Merged PRs (30d)
4

Description

### What version of `drizzle-orm` are you using?

0.30.9

### What version of `drizzle-kit` are you using?

0.20.17

### Describe the Bug

I'm using pg adapter and RDSDataClient

When inserting a new record with a timestamp column, the query fails with the error:

DatabaseErrorException: ERROR: column "due_date" is of type timestamp without time zone but expression is of type text; Hint: You will need to rewrite or cast the expression.

Here is my schema with the timestamp column type:

Screenshot 2024-04-29 at 12 47 30 PM

Here is where I'm trying to insert the record:
Screenshot 2024-04-29 at 12 48 11 PM

### Expected behavior

I expect the record to be saved with a properly formatted timestamp and not throw an error.

### Environment & setup

local

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.