SQLSTATE 42P01 is undefined_table. PostgreSQL cannot resolve a referenced relation in the current connection or query scope. A relation can be a table, view, or another table-like object. This does not prove that data was deleted: the database, schema, quoted name, or session may simply be different.
The application connected to the wrong database or deployment, or the migration creating the relation has not run there.
The relation exists in a schema outside the effective search path, or its mixed-case quoted name does not match the SQL identifier.
A temporary table was created on another pooled connection, or a query refers to a table name or alias outside its valid scope.
How to fix it
On the failing connection, run SELECT current_database(), current_user, current_schema(); and SHOW search_path; Compare these results with the working environment before creating any database objects.
Test a known target with SELECT to_regclass('public.orders'); using its real schema and spelling. A NULL result means that name did not resolve. Inspect the deployment schema and migration history to determine whether it is absent or named differently.
Use the intended schema-qualified name, such as app.orders, when appropriate. Match double-quoted mixed-case identifiers exactly. Avoid broadening search_path to untrusted writable schemas as a shortcut; that can introduce object-resolution security risks.
If the full message says missing FROM-clause entry, inspect aliases, JOIN visibility, and nested query scope instead of adding a table. A temporary table must be used in the session where it exists, so check connection-pool boundaries.
Apply a verified missing migration through the normal deployment process, then retest using the application role. Do not recreate or drop a similarly named table blindly; it may hide a connection configuration error and split writes across unintended objects.