kelbs
kelbs
Explore posts from servers
DTDrizzle Team
Created by kelbs on 4/2/2023 in #help
drizzle bug won't let me update mysql table
wrote a bug ticket on github describing the bug but just wanted to post here as well for visibility https://github.com/drizzle-team/drizzle-orm/issues/364 I think its because of reserved words in the table name
12 replies
DTDrizzle Team
Created by kelbs on 4/2/2023 in #help
Generated Collate value
Not sure if this is relevant but I'm translating a Prisma schema into drizzle. Every Prisma table had COLLATE utf8mb4_unicode_ci; added to the generated MySQL. One of my drizzle tables instead has COLLATE utf8mb4_0900_ai_ci; I'm not good enough at dbs/sql to know if this is important, a bug, or irrelevant
8 replies
DTDrizzle Team
Created by kelbs on 4/1/2023 in #help
What does MySQL bigint config mode do?
In a mysql schema, when creating a bigint, it wants a config object with a mode key where mode could be number. What does this do?
9 replies
DTDrizzle Team
Created by kelbs on 4/1/2023 in #help
MySQL unique constraint
In the drizzle schema, is there a way to label a column with unique constraint in mysql? I'm only seeing uniqueIndex
5 replies
DTDrizzle Team
Created by kelbs on 4/1/2023 in #help
Error querying planetscale db
Trying to get setup with drizzle and running into this error. There's not much info here so I'm not sure how to debug it
TypeError: fetch failed
at fetch (/home/kelby/work/jobs_fe/node_modules/undici/index.js:113:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async postJSON (file:///home/kelby/work/jobs_fe/node_modules/@planetscale/database/dist/index.js:115:22)
at async Connection.execute (file:///home/kelby/work/jobs_fe/node_modules/@planetscale/database/dist/index.js:75:23)
at async load (/home/kelby/work/jobs_fe/src/routes/+page.server.ts:34:14)
at async Module.load_server_data (/node_modules/@sveltejs/kit/src/runtime/server/page/load_data.js:33:17)
at async eval (/node_modules/@sveltejs/kit/src/runtime/server/page/index.js:168:13)
TypeError: fetch failed
at fetch (/home/kelby/work/jobs_fe/node_modules/undici/index.js:113:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async postJSON (file:///home/kelby/work/jobs_fe/node_modules/@planetscale/database/dist/index.js:115:22)
at async Connection.execute (file:///home/kelby/work/jobs_fe/node_modules/@planetscale/database/dist/index.js:75:23)
at async load (/home/kelby/work/jobs_fe/src/routes/+page.server.ts:34:14)
at async Module.load_server_data (/node_modules/@sveltejs/kit/src/runtime/server/page/load_data.js:33:17)
at async eval (/node_modules/@sveltejs/kit/src/runtime/server/page/index.js:168:13)
The query I'm trying to make at line 34 of +page.server.ts is:
import { db } from "$lib/server/db";
import { users } from "$lib/server/schema";
const res = await db.select().from(users);
import { db } from "$lib/server/db";
import { users } from "$lib/server/schema";
const res = await db.select().from(users);
15 replies
DTDrizzle Team
Created by kelbs on 4/1/2023 in #help
db push connection error
getting the following error on my first db push attempt
Ignoring invalid configuration option passed to Connection: sslaccept. This is currently a warning, but in future versions of MySQL2, an error will be thrown if you pass an invalid configuration option to a Connection
/home/kelby/work/jobs_fe/node_modules/drizzle-kit/index.js:43680
const createConnectionErr = new Error();
^

Error: unknown error: Code: UNAVAILABLE
server does not allow insecure connections, client must use SSL/TLS
Ignoring invalid configuration option passed to Connection: sslaccept. This is currently a warning, but in future versions of MySQL2, an error will be thrown if you pass an invalid configuration option to a Connection
/home/kelby/work/jobs_fe/node_modules/drizzle-kit/index.js:43680
const createConnectionErr = new Error();
^

Error: unknown error: Code: UNAVAILABLE
server does not allow insecure connections, client must use SSL/TLS
How do I make the db connection secure? Is that a drizzle option or a @planetscale/database option? Or maybe my connection string is wrong?
6 replies