No schema loaded in Drizzle Studio
I'm starting up Drizzle Studio after updating to the latest versions:
"drizzle-kit": "0.29.0", "drizzle-orm": "0.37.0"
.
The studio loads in with no schema and I have no idea why. I'm connecting to a Planetscale DB and following the docs to a tee using their driver. My configurations are all correct, and I can confirm my environment variables are making it into the config and everywhere else. I do have this set up in a monorepo, but this only recently started occurring. I even reverted to an older version and the same things happens.
- Introspection seems to work just fine
- No fatal errors when starting up the Studio
Any ideas?23 Replies
Hey! Does your database have any tables?
Yes, of course, lol
In fact, I can connect with a SQL GUI application and view all of my tables that way.
@devjmetivier Can you check the versions in all your projects in the monorepo? All up to date?
I am also having a similar issue. Seems to be showing that my schema is empty.
Using the SQL Runner works, but can't use drizzle studio anymore.
@macknolan Do you also use a monorepo?
Yes I have a pnpm monorepo. Happy to share any details. Let me know 🙂 Thanks for taking a look
Can you also check the versions in all your projects in the monorepo?
Update
drizzle-orm
and drizzle-kit
to the latest version everywheredrizzle-orm: "0.37.0"
drizzle-kit: "0.29.1"
Double checked that its the same across all packages. I also cleaned everything out and re-installed.
Can you please provide your drizzle-kit config?
Yes. All are up-to-date and same versions.
Here's my drizzle localstorage as well.
Also seem to be getting this error now. Console reads "Query was empty", but this is produced in Drizzle Studio UI.
Getting this same issue with PlanetScale and drizzle studio. Any solution yet @devjmetivier?
Hey! Can you please provide a bug report with introspected db schema from drizzle studio?
I also have the same issue, drizzle and planetscale. No monorepo.
I have the same issue: drizzle and planetscale
Hey! Is this error still happening?
Yes, it does not work at all. I cannot share debug logs. @⚡Z.E.U.S⚡ has a change gone out?
@devjmetivier Are you still experiencing this error? Maybe you could provide the connection URL(in DMs) and we could test it ourselves?
@devjmetivier @macknolan @nightwatch128 @Kasper @Hascke Anyone find a fix for this?
I think this is the same issue: https://discord.com/channels/1043890932593987624/1279992251119833170
Going to drop my setup here as well https://discord.com/channels/1043890932593987624/1043890932593987627/1329107923510628415
https://discord.com/channels/1043890932593987624/1043890932593987627/1329107531271770152
Also want to clear the air on the new Drizzle docs
https://orm.drizzle.team/docs/get-started/planetscale-new#step-3---connect-drizzle-orm-to-the-database
Why does the first block of code exist here?
In the warning I replied to - drizzle kit specifically told us to ONLY pass a client instance... we are now past v0.30 and the new docs still say to do otherwise
Drizzle ORM - MySQL
Drizzle ORM is a lightweight and performant TypeScript ORM with developer experience in mind.
After looking at it longer... I think if you want to pass your schema to the
drizzle()
function, you need to do it the old way. But passing the schema in the init file may not be necessary if you have a drizzle config (or how else would TS know about your schemas?)
Either way, the distinction here could be clearer