Incorrect syntax for renaming a column with a default method in MySQL #1911 (Fix Column Renaming Syntax for MySQL 8)#1945
Merged
Conversation
Added additional method to MySql8Generator for rename column support
…issue Add RenameColumn support for MySql8Generator
added MySql8ColumnTests file and added test cases
jzabroski
self-requested a review
February 24, 2025 19:25
Collaborator
|
Thanks. Changes look good - need to run it through the build server but will otherwise merge once tests pass. I'm having some difficulty with the "fluentmigrator CI for PRs" pipeline triggering. |
jzabroski
approved these changes
Feb 25, 2025
This was referenced Jan 30, 2026
This was referenced Feb 13, 2026
This was referenced Mar 6, 2026
This was referenced Mar 21, 2026
This was referenced Jun 8, 2026
This was referenced Jun 15, 2026
This was referenced Jul 8, 2026
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.
This pull request addresses the issue of incorrect SQL syntax when renaming columns in MySQL, particularly when the column has an expression default value (e.g., CURRENT_TIMESTAMP). The current implementation erroneously includes DEFAULT_GENERATED in the generated SQL, resulting in syntax errors during migration.
Changes Made
Modified the MySql8Generator to ensure that the SQL generated for renaming columns does not include the DEFAULT_GENERATED clause.
Implemented new unit tests to validate the renaming functionality for columns with default values in MySQL 8.