What it means
Your app connected to the database and asked for a table named users. The database has no such table. A new database starts empty, and something has to create the tables.
How to fix it
-
Your tool is detected. Antideploy runs Prisma, Drizzle, Alembic and Django migrations before the new version goes live:
npx prisma migrate deploy(ornpx prisma db pushwithout a migrations folder),npx drizzle-kit migrate,alembic upgrade head, andpython manage.py migrate. If you see this error anyway, check that the migration files are committed and the tool is in your project. -
Your tool is not detected. For Knex, TypeORM, Sequelize or plain SQL files, run the migration when the app starts, before it begins listening. For example, a
startscript such asnode migrate.js && node server.js. -
The migration ran against another database. Check that your code reads
DATABASE_URL, and that your ownDATABASE_URL, if you set one, points where you expect.
Steps
-
Check the deploy history
The deploy shows whether a migration ran, and whether it failed.
-
Add or fix the migration
Make the migration create the table, and commit it.
-
Deploy again
A failed migration fails the deploy, so a version your schema cannot support is never released. A failed deploy never counts against your plan.