-
-
Notifications
You must be signed in to change notification settings - Fork 476
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG]: value.getTime is not a function #2323
Comments
I don't have any issues with filtering, for your example, does I am getting the same error, createdDate: integer("created_date", { mode: "timestamp" })
.default(sql`(unixepoch())`)
.notNull(),
updatedDate: integer("updated_date", { mode: "timestamp" })
.$onUpdate(() => sql`(unixepoch())`)
.notNull(), I suspect there is some epoch time vs JS date type issue. |
You should change type from integer into text |
@magicalpuffin I've got the same issue. I was happy to see that they added I also don't want a text column, because it's a timestamp, not text. |
What version of
drizzle-orm
are you using?0.30.10
What version of
drizzle-kit
are you using?0.21.2
Describe the Bug
Bug Report: Error when using time-related queries
Description
When attempting to use time-related queries with
drizzle-kit
, I encounter an error. Specifically, the error occurs when trying to fetch records from thevisits
table where thecreatedAt
timestamp is greater than or equal to the current time.Code Snippets
Here is the code that produces the error:
Schema definition for the
visits
table:Error Message
Expected behavior
No response
Environment & setup
No response
The text was updated successfully, but these errors were encountered: