ihernandez.
DTDrizzle Team
•Created by Jim on 9/4/2023 in #help
Type error inserting 'new Date()' into 'time' type schema.
You need convert the new Date() in a string format like that: 2023-08-31T20:11:36.159908, or you can calculate the current time in your database, for example: gt(schema.timestamp, sql
NOW()
)11 replies
DTDrizzle Team
•Created by Liltripple_reid on 9/4/2023 in #help
drizzle asks for <table> `id` when doing insert
with .primaryKey() you only indicate that this column is the key of the record in the table, you must indicate separately that it is an AUTO_INCREMENT data, or you can use id: uuid('id').defaultRandom().primaryKey().
5 replies
DTDrizzle Team
•Created by Jim on 9/4/2023 in #help
Type error inserting 'new Date()' into 'time' type schema.
Try: await db.insert(metalPrices).values({
metal: "FOO",
time: sql
CURTIME()
,
});11 replies