I have been developing a T3 app (Next/Primsa/TRPC) and everything has been working well. I have a local SQLite DB for development. I havent worked on the app in a few weeks, but came back to it and when I try to load views that interact w/ the DB over TRPC, i get errors like:
The table `main.XYZ` does not exist in the current database.
I can look at the DB and it definitely has that table with many rows in it. I can even copy the generated SQL query from the logs, drop it into a SQLite client attached to the DB, and it works just fine.
One thing i noticed when i first started this, was the app - seemingly out of the blue - started complaining about: Your schema.prisma could not be found ...
. Following the instructions at [1] removed this error, but now it says it cant find a table that definitely exists. It feels like something has happened where my primsa is not linking up to my actual DB or something?
Ive also re-run prisma db-push and db-generate, and restarted nextjs many times. What might have caused this? How do i resolve?