Skip to content

pg-delta: user-defined objects in managed schemas (auth, storage) are filtered out of diffs #254

@avallete

Description

@avallete

Summary

pg-delta's "Supabase-managed schema" filter excludes the entire auth / storage schemas, which also drops user-defined objects living inside them (e.g. a trigger attached to auth.users). migra picks these up correctly.

Reproduction

  1. Create a trigger on auth.users in the local database.
  2. Run either of:
    supabase db diff --schema auth,storage -f temp
    supabase db diff -f temp
    
  3. The user-defined trigger is missing from the generated migration.
  4. Re-run with --use-migra — the trigger appears as expected.

Expected behavior

The filter should distinguish between Supabase-managed objects (which should remain ignored) and user-defined objects inside managed schemas (which should be diffed). The schema-level exclusion is too coarse.

Notes

  • Behavior is consistent across --schema auth,storage and the default invocation.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions