How to type results that includes relations ?
Error: Either `connectionString` or `host, port, etc.` params be provided in config file
Setting AUTO_INCREMENT starting value
ALTER TABLE tbl AUTO_INCREMENT = 100;
Is it possible to do that using Drizzle?MySQL varchar gets inferred as MySqlText?
next-auth
adapter help again. Is this my bug or Drizzle's? (Probably Drizzle's because Drizzle STINKS)
TL;DR: MySQL varchars are getting inferred as MySqlText
.
Part of the requirements of next-auth
is to provide a minimum schema but also let folks extend off of it. So, I have a minimum schema built for MySQL and am inferring it's type. But it looks to me like the inferred type of MySQL's varchar
becomes MySqlText
when it gets inferred. The problem with this ends up being that, when folks want to provide their custom table with the varchar (which is correct) they get an error because TS thinks it's supposed to be a MySqlText
....Problem with infering json type in zod schema
.$type()
helper only works on the type level, it cannot change the runtime behavior. The schema validation happens at runtime, thus it doesn't know about your type. If you want to validate your json field according to your type, you would need to refine the insert schema, like this:
```ts
const TestInsertSchema = createInsertSchema, {
value: () => z.object({ a: z.string(), b: z.number() }),
});...can't execute basic pg cmnds in drizzle orm .
const result = await db.select().from('auth_key')
const result = await db.select().from('auth_key')
e: ReferenceError: auth_key is not defined
e: ReferenceError: auth_key is not defined
Implement full text search in postgres
Select One UX improvement
const arr = await db.select().from(worlds).where(eq(worlds.id, id)).limit(1)
const world = arr[0]
const arr = await db.select().from(worlds).where(eq(worlds.id, id)).limit(1)
const world = arr[0]
Trouble getting drizzle to run on server side in nextjs
Relational query erroring on workers + D1
--remote
) or deployed it errors
```
[ERROR] Uncaught (in promise) Error: D1_ERROR...Infer return type for relational query with pagination
How to implement triggers or db hooks ?
noob help: INSERT with JOIN SQL to Drizzle
.values()
method?
```
INSERT INTO billing (team_id, credit_change, credits, type)
SELECT teams.id, billing.credit_change, teams.credits + billing.credit_change, 'runtime'...OrderBy with dynamic queries dont work
....orderBy(sql`${products.xyz} ${order}`)
....orderBy(sql`${products.xyz} ${order}`)
Is there a way to limit update to just 1 document?
```export const joinTable = async (tableId: number, seatedPlayerId: number) => { await db .update(tableSeats) .set({ seatedPlayerId })...
How to get InferModel to work with Relation model?
MySQL column type: "Generated"?
sql
If not, is it dangerous to send MySQL a custom DDL statement to Add a generated column?
...Anyone else having a weird issue with drizzle-kit push:mysql?
Performance questions