Liam
Liam
Explore posts from servers
DTDrizzle Team
Created by nightwatch128 on 11/10/2024 in #help
TypeError: client.migrate
Getting this aswell, did you find a solution?
9 replies
DTDrizzle Team
Created by Liam on 7/31/2024 in #help
There is not enough information to infer relation
5 replies
DTDrizzle Team
Created by Liam on 7/31/2024 in #help
There is not enough information to infer relation
The weird thing is that as far as I can tell this is a one-to-one relation, so much of the advice on other tables does not apply here
5 replies
DTDrizzle Team
Created by Liam on 7/8/2023 in #help
Drizzle-zod Include Relations
I did it like so if anyone needs it for future reference (cc @pudgereyem @shreddish )
const userValidator = createInsertSchema(users);

const userDataValidator = z.object({
data: createInsertSchema(data),
});

export const insertUserWithDataValidator = userValidator.merge(userDataValidator);
const userValidator = createInsertSchema(users);

const userDataValidator = z.object({
data: createInsertSchema(data),
});

export const insertUserWithDataValidator = userValidator.merge(userDataValidator);
You can also do it via extent, albeit with some wonky behaviours sometimes if you start adding in omits and what not
const userWithDataValidator = createInsertSchema(users).extend({
data: createInsertSchema(data)
});
const userWithDataValidator = createInsertSchema(users).extend({
data: createInsertSchema(data)
});
10 replies
DTDrizzle Team
Created by bun on 4/1/2024 in #help
dates in sqlite not being evaluated, causing "Invalid Date"
Hey OP, did you ever find a solution to this?
4 replies
DTDrizzle Team
Created by makaron pelnoziarnisty on 2/8/2024 in #help
Cannot read properties of undefined (reading 'columns')
beyond using the local server
5 replies
DTDrizzle Team
Created by makaron pelnoziarnisty on 2/8/2024 in #help
Cannot read properties of undefined (reading 'columns')
Hey did you ever wind up finding a fix for this?
5 replies