is there a reason why my row isn't being delete with CURRENT_TIMESTAMP

const deleted_matches = await db
.delete(schema.matches)
.where(
and(
or(eq(schema.matches.status, 'PENDING'), eq(schema.matches.status, 'CANCELED')),
gt(schema.matches.expire_time, sql`CURRENT_TIMESTAMP`)
)
)
.returning();
const deleted_matches = await db
.delete(schema.matches)
.where(
and(
or(eq(schema.matches.status, 'PENDING'), eq(schema.matches.status, 'CANCELED')),
gt(schema.matches.expire_time, sql`CURRENT_TIMESTAMP`)
)
)
.returning();
expire_time is a sql timestamp with date and time
2 Replies
Luxaritas
Luxaritas15mo ago
I think you have your condition backwards (expire_time > current_timestamp)
Screw
ScrewOP15mo ago
im so silly silly dev!
Want results from more Discord servers?
Add your server