Skip to content

Commit

Permalink
Fix schema reflection issue in _redo_everything path (#7957)
Browse files Browse the repository at this point in the history
In _redo_everything, we need to delete all of the temporary collection
types we may have created in _undo_everything. Currently, when we run
those deletion commands, context.canonical is True, so nested
collections aren't deleted.
  • Loading branch information
msullivan authored Nov 1, 2024
1 parent dabb9ae commit 8f2b29b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions edb/pgsql/delta.py
Original file line number Diff line number Diff line change
Expand Up @@ -2821,7 +2821,12 @@ def _redo_everything(

# do an apply of the schema-level command to force it to canonicalize,
# which prunes out duplicate deletions
#
# HACK: Clear out the context's stack so that
# context.canonical is false while doing this.
stack, context.stack = context.stack, []
cmd.apply(schema, context)
context.stack = stack

for sub in cmd.get_subcommands():
acmd2 = CommandMeta.adapt(sub)
Expand Down

0 comments on commit 8f2b29b

Please sign in to comment.