🗄️Table doesn't exist
error: relation "users" does not exist
The database doesn't have a table with that name yet. It's in the code, but it was never created in the database.
🤔 Why does it happen?
- The step that creates tables (migration, db push) wasn't run
- It exists in the development database but not in the live database
- The table name's spelling or capital letters are different
🔧 Try this
- If you use an ORM, run its table-creating command (for example, drizzle-kit push or prisma migrate)
- Check which database you're connected to right now (DATABASE_URL)
🤖 Ask your AI like this
I get the error below from the database. Please check how this project creates tables (migrations), and tell me the command to create the tables in the real database. If a command would delete existing data, warn me first. [Paste the full error here]
Replace the [ ] parts with your own situation, and paste the error with a few extra lines before and after it.
Related terms
Other errors in this group
- Database connection failed
Can't reach database server - Login address mismatch (redirect_uri_mismatch)
Error 400: redirect_uri_mismatch - Blocked by security rules (RLS), so it won't save
new row violates row-level security policy - Tried to save a value that already exists (duplicate)
duplicate key value violates unique constraint - Login info has expired (JWT)
JWT expired - Login app info is wrong (invalid_client)
Error 401: invalid_client - Google login blocked (app not verified, testing mode)
Access blocked: app has not completed the Google verification process - Prisma isn't ready (prisma generate)
@prisma/client did not initialize yet. Please run "prisma generate"