Update H2 database configuration for H2 2.x compatibility#41
Open
devin-ai-integration[bot] wants to merge 1 commit intomasterfrom
Open
Update H2 database configuration for H2 2.x compatibility#41devin-ai-integration[bot] wants to merge 1 commit intomasterfrom
devin-ai-integration[bot] wants to merge 1 commit intomasterfrom
Conversation
- Update JDBC URL in example.yml to include AUTO_SERVER=TRUE for H2 2.x - Add explicit H2 2.2.224 version in pom.xml (H2 2.x required by Dropwizard 4.x) - Update maven-compiler-plugin source/target from 1.6 to 11 (H2 2.x requires Java 11+) - Reviewed migrations.xml: Liquibase createTable with bigint autoIncrement is already H2 2.x compatible - No native SQL queries found in Java source code Co-Authored-By: Wes Convery <2wconvery@gmail.com>
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
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.
Summary
Updates the H2 database dependency and configuration to prepare for H2 2.x (as used by Dropwizard 4.x). Three changes:
example.yml: Appended;AUTO_SERVER=TRUEto the JDBC URL. H2 2.x requires explicit options for file-based databases —AUTO_SERVER=TRUEenables automatic mixed-mode so the database file can be shared across processes.pom.xml: Pinned H2 to version2.2.224(previously inherited1.4.192from the Dropwizard 1.0.5 BOM).pom.xml: Bumpedmaven-compiler-pluginsource/target from1.6to11, since H2 2.x requires Java 11+.What was reviewed and left unchanged:
src/main/resources/migrations.xml— uses LiquibasecreateTablewithbigint autoIncrement, which is compatible with H2 2.x.Review & Testing Checklist for Human
1.0.5, meaning Hibernate and other libraries are from that era. Confirm the old Hibernate version works correctly with H2 2.2.224 at runtime (not just compile time). You may need to sethibernate.dialecttoorg.hibernate.dialect.H2Dialectexplicitly if H2 auto-detection fails.java -jar target/DropwizardEmployee-1.0.5.jar server example.ymlafter runningdb migrate, and verify CRUD operations against the H2 database work. Compile success alone does not guarantee runtime compatibility.AUTO_SERVER=TRUEvsMODE=LEGACY:AUTO_SERVER=TRUEwas chosen for multi-process file access. If you encounter SQL syntax errors at runtime (e.g., from Hibernate-generated DDL), you may needMODE=LEGACYinstead or in addition.Notes
2.2.224) will be redundant once the Dropwizard BOM is upgraded to 4.x, at which point it can be removed so the BOM manages the version again.migrations.xmlwas reviewed for H2 2.x SQL compatibility issues (identity columns, deprecated functions) — none found.Link to Devin session: https://app.devin.ai/sessions/a480bcf7137f4e3eb7abb54845913bfa
Requested by: @WesternConcrete