You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: discover and load downstream schemas for cascade and drop
Previously, cascade delete and drop only traversed tables in
explicitly activated schemas. If a dependent table lived in an
unactivated schema (common in multi-schema pipelines), it was
invisible to the dependency graph, causing FK errors at delete time.
New Dependencies.load_all_downstream() method iteratively discovers
schemas that reference the loaded schemas via FK relationships,
expanding the dependency graph until all downstream schemas are
included. Uses information_schema (MySQL) and pg_constraint
(PostgreSQL) to find cross-schema FK references.
Diagram.cascade() and Table.drop() now call load_all_downstream()
before building the dependency graph.
Includes integration test: two schemas where the downstream schema
has an FK to the upstream schema, verifying that cascade delete
discovers and deletes from both.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
0 commit comments