Add migration script integration tests#4954
Closed
baezzys wants to merge 1 commit into
Closed
Conversation
1f11625 to
ced1cbf
Compare
91bb4d2 to
8608e18
Compare
b095f10 to
b2c63d3
Compare
- Implement 4.x to 5.0 migration validation for all supported databases - Add 4.x baseline schema files for migration testing - Use TestContainers for major databases, embedded for others - Auto-disable tests when Docker unavailable Resolves: spring-projects#4289 Signed-off-by: baezzys <wlsdn3578@gmail.com>
aa77031 to
d79971b
Compare
fmbenhassine
added a commit
that referenced
this pull request
Nov 18, 2025
- Use v5.2 scripts as starting point - Move migration tests to a dedicated package - Update docker images
Contributor
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.
Overview
This PR adds integration tests to validate the Spring Batch 4.x → 5.0 database schema migration scripts for all datasources where 5.0 migration scripts are available.
Resolves #4289
Implementation Details
Test Strategy
The tests implement the following validation approach:
schema-{database}-4.sqlfilesmigration/5.0/migration-{database}.sqlfilesDatabase Coverage
Working Databases (Tests Pass)
Migration Issues Discovered (Tests Fail)
During testing, migration script execution failed on several databases due to compatibility issues:
MODIFY COLUMNsyntax not supportedSyntax error: Encountered "MODIFY"MODIFY COLUMNsyntax not supportednear "MODIFY": syntax errorMODIFY COLUMNsyntax not supportedunexpected token: MODIFYMODIFY COLUMNsyntax not supportedSQLCODE=-104, SQLSTATE=42601ALTER TABLE with data copy cannot be doneselect intoandfull loggingoptionsTechnical Implementation
TestContainers Integration:
@Testcontainers(disabledWithoutDocker = true)Embedded Database Support:
EmbeddedDatabaseBuilderfor consistency