Ghostman
Ghostman
DTDrizzle Team
Created by Ghostman on 3/8/2024 in #help
How to remove the space between timestamp and precision?
@Jim is there any other solution with using mode "date"?
8 replies
DTDrizzle Team
Created by Ghostman on 3/8/2024 in #help
How to remove the space between timestamp and precision?
But if I set the timestamp to string, I'm having typescript error on my project because the "created_at" was set as date
8 replies
DTDrizzle Team
Created by pandareaper on 8/6/2023 in #help
Issues with timestamp precision with postgres
export const requests = pgTable("Requests", {
...
createdAt: timestamp("createdAt", { precision: 3, mode: 'date' }).defaultNow(),
updatedAt: timestamp("updatedAt", { precision: 3, mode: 'date' }),
...
}

This is my schema.ts file
export const requests = pgTable("Requests", {
...
createdAt: timestamp("createdAt", { precision: 3, mode: 'date' }).defaultNow(),
updatedAt: timestamp("updatedAt", { precision: 3, mode: 'date' }),
...
}

This is my schema.ts file
And I didn't put the space to my type.
CREATE TABLE IF NOT EXISTS "Requests" (
...
"createdAt" timestamp(3) DEFAULT CURRENT_TIMESTAMP,
"updatedAt" timestamp(3),
...

);
CREATE TABLE IF NOT EXISTS "Requests" (
...
"createdAt" timestamp(3) DEFAULT CURRENT_TIMESTAMP,
"updatedAt" timestamp(3),
...

);
This is my sql file that was generated after introspecting the database. Could you please share these files?
8 replies
DTDrizzle Team
Created by pandareaper on 8/6/2023 in #help
Issues with timestamp precision with postgres
I'm getting this error because my current data type is timestamp(3) but new type is timestamp (3) - there is space between timestamp and precision. Can you please share the migration data of timestamp so that I can refer it?
8 replies
DTDrizzle Team
Created by pandareaper on 8/6/2023 in #help
Issues with timestamp precision with postgres
No description
8 replies
DTDrizzle Team
Created by pandareaper on 8/6/2023 in #help
Issues with timestamp precision with postgres
Did you solve your problem?
8 replies
DTDrizzle Team
Created by pandareaper on 8/6/2023 in #help
Issues with timestamp precision with postgres
Hi @pandareaper
8 replies