Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow renameColumn on newer SQLite versions #3264

Merged
merged 3 commits into from Oct 11, 2022
Merged

Allow renameColumn on newer SQLite versions #3264

merged 3 commits into from Oct 11, 2022

Conversation

MalloD12
Copy link
Contributor

@MalloD12 MalloD12 commented Sep 9, 2022

Impact

  • Bug fix (non-breaking change which fixes expected existing functionality)
  • Enhancement/New feature (adds functionality without impacting existing logic)
  • Breaking change (fix or feature that would cause existing functionality to change)

Description

Updated supports() method logic from RenameColumnGenerator class to return true for SQLite database from version 3.25 or higher, or any other supported database.

Fixes #2925

Things to be aware of

  • Change method logic to consider SQLite DB version.
  • This change only has impact on SQLite, for any other database it will keep behaving as of now.

Things to worry about

  • This method might need to be revisited once again in a future if for a newer version this change is not again supported.

Additional Context

  • Nothing.

@github-actions
Copy link

github-actions bot commented Sep 9, 2022

Unit Test Results

  4 668 files  ±0    4 668 suites  ±0   33m 15s ⏱️ + 2m 8s
  4 609 tests ±0    4 380 ✔️ ±0     229 💤 ±0  0 ±0 
54 516 runs  ±0  49 448 ✔️ ±0  5 068 💤 ±0  0 ±0 

Results for commit 12636b1. ± Comparison against base commit 3c94c98.

♻️ This comment has been updated with latest results.

@nvoxland nvoxland changed the title Fix supports method logic from rename column class to allow rename action to be perform on newer SQLite versions Allow renameColumn on newer SQLite versions Sep 30, 2022
Copy link
Contributor

@nvoxland nvoxland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review and test results:

Things to be aware of:

  • Change is isolated to sqlite, and only for newer versions of sqlite
  • Adds integration test for sqlite
  • Functional tests are failing due to needed test changes not merged into master and is unrelated to this change
  • Test-harness is failing on mssql due to datatbase not starting, but the sqlite one ran which should be all we need

Things to worry about:

  • Nothing

@nvoxland nvoxland removed their assignment Sep 30, 2022
Copy link
Contributor

@XDelphiGrl XDelphiGrl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Versions of SQLite greater than 3.25 support renaming columns. This fix allows Liquibase to generate SQL for column renames for those newer versions. The logic for older versions of SQLite remains unchanged (does not allow for column renames).

  • New integration test added to validate column rename.
  • No additional testing required.

APPROVED

@nvoxland nvoxland merged commit 21dca6c into master Oct 11, 2022
@nvoxland nvoxland deleted the fix-issue-2925 branch October 11, 2022 17:48
@nvoxland nvoxland added this to the 1NEXT milestone Oct 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Liquibase could support renameColumn for Sqlite 3.25.0+
5 participants