Conversation
Creatixpy
requested review from
Shinigami92,
brenoepics and
osdiab
as code owners
September 22, 2026 16:10
Collaborator
Author
|
Most of the diff comes from regression tests and SQL snapshots repeated across PostgreSQL 14–18. The production fix touches only two files. It fixes migration-history insertion and deletion when apostrophes cause SQL errors or alter stored names, plus a related dollar-delimiter collision in |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Migration filenames such as
0001_user's-table.cjsnow retain their exact names when recorded in or removed from migration history. Previously, apostrophes generated invalid history SQL, while repeated apostrophes could silently change the recorded name. Withpgm.noTransaction(), schema changes could succeed before history recording failed.Reuse
escapeValuefor both history insertion and deletion, covering normal execution, explicit and automatic rollback, and fake migrations. Accepted filenames, public APIs, types, schema/table quoting, transaction behavior, and dry-run guarantees are preserved.Also fix a related delimiter collision in
escapeValue: a value ending in$pgacould combine with the closing delimiter's first$and terminate the literal early. Delimiter selection now rejects these overlaps as well as complete delimiters within values. Regression tests cover scalar and nested-array values, and existing SQL snapshots change only in history-name quoting. Schema changes left unrecorded by earlier failed runs still require manual reconciliation.Validation for
63e230f1b053c27e20c4d4aa6e6dd5653b590e6eon Node 24.21.0 / pnpm 12.4.1:Fixes #1753.