Having Issues Pushing Database Schema

Hi I am getting this issue whenever I am trying to push the database schema. Any help would be greatly appreciated.
❯ pnpm drizzle-kit push:mysql --schema=./Database/schema.ts
drizzle-kit: v0.19.13
drizzle-orm: v0.28.6

Invalid input Only "mysql2" is available options for "--driver"
❯ pnpm drizzle-kit push:mysql --schema=./Database/schema.ts
drizzle-kit: v0.19.13
drizzle-orm: v0.28.6

Invalid input Only "mysql2" is available options for "--driver"
9 Replies
Noahh
Noahh15mo ago
Can you share your drizzle.config file?
Fil
FilOP15mo ago
{
"out": "./migrations-folder",
"schema": "./Database/schema.ts",
"breakpoints": false
}
{
"out": "./migrations-folder",
"schema": "./Database/schema.ts",
"breakpoints": false
}
Fil
FilOP15mo ago
Sorry I am a little bit confused. THe config file is it supposed to point to the schema and index.ts?
Noahh
Noahh15mo ago
The config file helps Drizzle Kit commands run. So, when you pnpm drizzle-kit generate:pg, it needs to know 1. where you schema files are so it can run them 2. where you want your SQL files to output with push, it needs to know the same information, but it also needs to know what driver you're using (pg, mysql2, etc.), as well as your connection string so it can properly connect to the database and apply the migrations
Fil
FilOP15mo ago
I am using Nextjs and I am trying to settup the connection for planetscale
Noahh
Noahh15mo ago
yep, so since Planetscale is mysql, I believe you need to use the mysql2 driver (never worked with planetscale or mysql with drizzle so i'm just assuming, it doesn't seem like there is a planetscale driver specifically)
Fil
FilOP15mo ago
Okay I found out the issue, I moved my drizzle.config.ts to the right folder
Want results from more Discord servers?
Add your server