Skip to content

Incorrect syntax for renaming a column with a default method in MySQL #1911 (Fix Column Renaming Syntax for MySQL 8)#1945

Merged
jzabroski merged 10 commits into
fluentmigrator:mainfrom
Cretesh-Anuj:main
Mar 5, 2025
Merged

Incorrect syntax for renaming a column with a default method in MySQL #1911 (Fix Column Renaming Syntax for MySQL 8)#1945
jzabroski merged 10 commits into
fluentmigrator:mainfrom
Cretesh-Anuj:main

Conversation

@Cretesh-Anuj

Copy link
Copy Markdown
Contributor

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.

Cretesh-Anuj and others added 6 commits December 1, 2024 18:26
Added additional method to MySql8Generator for rename column support
…issue

Add RenameColumn support for MySql8Generator
added  MySql8ColumnTests file and added test cases
@jzabroski
jzabroski self-requested a review February 24, 2025 19:25
@jzabroski jzabroski added this to the 7.0.0 milestone Feb 24, 2025
@jzabroski

Copy link
Copy Markdown
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 jzabroski added the needs:ci-build CI Build Needed. Do not rename this label without updating GH Actions referencing it label Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs:ci-build CI Build Needed. Do not rename this label without updating GH Actions referencing it

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants