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?
No description
No description
20 Replies
devjmetivier
devjmetivierOP3w ago
No description
⚡Z.E.U.S⚡
⚡Z.E.U.S⚡3w ago
Hey! Does your database have any tables?
devjmetivier
devjmetivierOP3w ago
Yes, of course, lol In fact, I can connect with a SQL GUI application and view all of my tables that way.
⚡Z.E.U.S⚡
⚡Z.E.U.S⚡3w ago
@devjmetivier Can you check the versions in all your projects in the monorepo? All up to date?
macknolan
macknolan3w ago
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.
No description
⚡Z.E.U.S⚡
⚡Z.E.U.S⚡3w ago
@macknolan Do you also use a monorepo?
macknolan
macknolan3w ago
Yes I have a pnpm monorepo. Happy to share any details. Let me know 🙂 Thanks for taking a look
⚡Z.E.U.S⚡
⚡Z.E.U.S⚡3w ago
Can you also check the versions in all your projects in the monorepo? Update drizzle-orm and drizzle-kit to the latest version everywhere
macknolan
macknolan3w ago
drizzle-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.
⚡Z.E.U.S⚡
⚡Z.E.U.S⚡3w ago
Can you please provide your drizzle-kit config?
macknolan
macknolan3w ago
import { defineConfig } from "drizzle-kit";
export default defineConfig({
dialect: "mysql",
dbCredentials: {
url: process.env.DATABASE_URL!,
},
// Pick up all our schema files
schema: "./src/schema.ts",
out: "./migrations",
});
import { defineConfig } from "drizzle-kit";
export default defineConfig({
dialect: "mysql",
dbCredentials: {
url: process.env.DATABASE_URL!,
},
// Pick up all our schema files
schema: "./src/schema.ts",
out: "./migrations",
});
devjmetivier
devjmetivierOP3w ago
Yes. All are up-to-date and same versions. Here's my drizzle localstorage as well.
{
"drizzle-version": "3.0.0",
"drizzle-playground": {
"state": {
"currentFile": "schema",
"drizzleValue": null,
"sqlValue": null,
"showRecordsAsJson": false,
"drizzleResult": "{\"json\":null}",
"sqlResult": "{\"json\":null}"
},
"version": 0
},
"drizzle-global": {
"state": {
"showCounts": true,
"flatSchemas": false,
"dataFormats": null
},
"version": 0
},
"drizzle-db-2faad51ba4f685df39237f2cc06f6e200057f1f1864cd0e878b5d8c4ecf1cae2": {
"state": {
"styleMode": "default",
"currentPage": "create-view",
"filterViews": {},
"isSidebarOpen": true,
"isShowSidebarContent": true,
"filtersVisible": false,
"sidebarWidth": 268,
"currentSchemaName": "",
"currentTable": null
},
"version": 0
}
}
{
"drizzle-version": "3.0.0",
"drizzle-playground": {
"state": {
"currentFile": "schema",
"drizzleValue": null,
"sqlValue": null,
"showRecordsAsJson": false,
"drizzleResult": "{\"json\":null}",
"sqlResult": "{\"json\":null}"
},
"version": 0
},
"drizzle-global": {
"state": {
"showCounts": true,
"flatSchemas": false,
"dataFormats": null
},
"version": 0
},
"drizzle-db-2faad51ba4f685df39237f2cc06f6e200057f1f1864cd0e878b5d8c4ecf1cae2": {
"state": {
"styleMode": "default",
"currentPage": "create-view",
"filterViews": {},
"isSidebarOpen": true,
"isShowSidebarContent": true,
"filtersVisible": false,
"sidebarWidth": 268,
"currentSchemaName": "",
"currentTable": null
},
"version": 0
}
}
devjmetivier
devjmetivierOP3w ago
Also seem to be getting this error now. Console reads "Query was empty", but this is produced in Drizzle Studio UI.
No description
nightwatch128
nightwatch1283w ago
Getting this same issue with PlanetScale and drizzle studio. Any solution yet @devjmetivier?
⚡Z.E.U.S⚡
⚡Z.E.U.S⚡3w ago
Hey! Can you please provide a bug report with introspected db schema from drizzle studio?
Kasper
Kasper3w ago
I also have the same issue, drizzle and planetscale. No monorepo.
Hascke
Hascke2w ago
I have the same issue: drizzle and planetscale
⚡Z.E.U.S⚡
⚡Z.E.U.S⚡2w ago
Hey! Is this error still happening?
nightwatch128
nightwatch1282w ago
Yes, it does not work at all. I cannot share debug logs. @⚡Z.E.U.S⚡ has a change gone out?
⚡Z.E.U.S⚡
⚡Z.E.U.S⚡2w ago
@devjmetivier Are you still experiencing this error? Maybe you could provide the connection URL(in DMs) and we could test it ourselves?
Want results from more Discord servers?
Add your server