with some effort I've come up with a fairly cut down example of a schema that fails to plan.
$ pgschema plan --host localhost --db mytmp1 --user nsl --schema public --file build/dumpschema1.sql --output-json mytmp1.json --output-human mytmp1.sql
Error: failed to apply desired state: failed to apply schema SQL to temporary schema pgschema_tmp_20260913_150019_a831fa9b: ERROR: relation "public.name" does not exist (SQLSTATE 42P01)
Hint: this schema may reference objects in another schema that the embedded plan database does not have. If the table exists on the target database, add it to .pgschemaignore ([schemas] or schema-qualified [tables] pattern, e.g. auth or auth.users), see https://www.pgschema.com/cli/ignore. Otherwise add a stub CREATE SCHEMA/TABLE in your desired SQL, or use an external plan database (--plan-host), see https://www.pgschema.com/cli/plan-db
[chris@p14s-omarchy public]$
I loaded the attached dump into a database with psql, then planned against it and got the above error.
dumpschema1.sql
with some effort I've come up with a fairly cut down example of a schema that fails to plan.
I loaded the attached dump into a database with psql, then planned against it and got the above error.
dumpschema1.sql