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.
9 Replies
Can you share your
drizzle.config
file?Configuring Drizzle kit - DrizzleORM
Drizzle ORM | %s
As seen here: https://orm.drizzle.team/kit-docs/conf#push-and-pull
Configuration files - DrizzleORM
Drizzle ORM | %s
Sorry I am a little bit confused. THe config file is it supposed to point to the schema and index.ts?
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 migrationsI am using Nextjs and I am trying to settup the connection for planetscale
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)Okay I found out the issue, I moved my drizzle.config.ts to the right folder