priv/repo/tenant_schema/_custom/README.md
_custom/ — SQL that pg-delta does not manageFiles in this folder are preserved across pgdelta schema export runs:
the exporter never writes here, never deletes anything here, and never counts
these files as "unmanaged".
Put here the SQL that pg-delta detects but does not model (reported as
unmodeled_kind): casts, operators, operator classes/families, text search
objects, statistics objects, transforms — plus idempotent DML your schema
depends on (write seeds as INSERT … ON CONFLICT DO NOTHING).
pgdelta schema apply, so
modeled objects that depend on them (e.g. an index over a custom operator
class) elaborate correctly, and re-exports keep working.Record the migration(s) that delivered a file as head-of-file comments:
-- pgdelta-migration: ../../supabase/migrations/20260811120000_add_cast.sql
Use -- pgdelta-migration: none if a file deliberately has no migration twin.
pgdelta schema lint warns on missing or dangling references.
Tables, views, functions, policies, … belong in the managed tree — the
exporter regenerates them. A modeled object kept here becomes a duplicate on
the next export and breaks schema apply. pgdelta schema lint warns when it
sees one.