Prisma5w ago

Local sqlite db in monorepo with nextJS trying to find table 'main.TABLE' instead of 'TABLE'

Hi, I'm running a monorepo with my db separate from my NextJS package, and have already implemented the workaround plugin to let it find the external DB. It's my first time trying to get anything to show up, and I'm now getting an error in the frontend:
Invalid prisma.builtPrompt.findMany() invocation: The table main.BuiltPrompt does not exist in the current database. The table BuildPrompt definitely exists, and I don't know where the main. came from; I can see the rows in Prisma studio. My googling suggested it might be a migration problem, but I don't know enough about that to know next. I've migrate dev and am getting "Datasource "db": SQLite database "dev.db" at "file:./dev.db" Already in sync, no schema change or pending migration was found." I'm stuck. What should I try?
1 Reply
Smitty5w ago
Here's the log: prisma:query SELECT main.BuiltPrompt.id, main.BuiltPrompt.createdAt, main.BuiltPrompt.prompt, main.BuiltPrompt.taskName, main.BuiltPrompt.messageName FROM main.BuiltPrompt WHERE 1=1 LIMIT ? OFFSET ? if i run the queries with bun from the CLI, it works as expected. it seems like some issue with connecting to next? I just moved it out of a monorepo structure and that solved the problem. Unfortunately no real resolution to the problem. Not sure how to mark this as done yet not resolved.
Want results from more Discord servers?
Add your server
More Posts