-
Notifications
You must be signed in to change notification settings - Fork 407
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix some alter+rename combos on pointers in POPULATE MIGRATION
Doing multiple operations on a pointer and renaming it at the same time in a migration created with POPULATE MIGRATION sometimes fails, because we weren't properly applying renames when generating the AST. This *didn't* happen when using the normal migration flow, because the renames get processed incrementally there. I think I introduced this as a regression in #4007. I also fixed an issue where in a CREATE MIGRATION script, you could refer to the old name of something in a later command. The reason I dealt with that here is because it was preventing schema tests from finding the bug here, since in the schema test the migration script was only checked by applying it with CREATE MIGRATION. (In the actual server, POPULATE MIGRATION explicitly checks the commands validity in a way not afected by this, which is where these failures were happening.) Because of those explicit validity checks, I'm confident that there aren't auto-generated migrations out there that rely on this bug. Fixes #6664.
- Loading branch information
Showing
4 changed files
with
157 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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