Terminal or Vercel runtime logs
NeonDbError: relation "…" does not exist
- What it means
- Your code queried a database table (Postgres calls tables “relations”) that hasn't been created in this database branch yet.
- Likely causes
- New tables were added to the schema in code, but the database migration hasn't been run yet.
- The migration ran on your local development database branch, but not on the Preview or Production database yet.
- Prevention
- Run database migrations as part of your deployment checklist whenever a task adds or changes a table.
Copy for your agent
The database returned `relation does not exist`. Check which migrations or Better Auth tables are pending on this database branch, explain what will be created, and run the migration safely.
Was this page helpful?