fix(config): create the dev-mode schema so quarkus:dev boots usable - #591
Conversation
quarkus.hibernate-orm.schema-management.strategy was set only under %prod. Dev mode points at an explicit H2 URL, so no Dev Services database is started and nothing creates the schema for it, and Hibernate's default strategy is none: a fresh clone booted against an empty database. The app came up and /q/health answered 200 while post-boot validation logged "missing table [finding_feedback]", the startup cost backfill failed, and every DB-backed request died with Table "REVIEWSESSION" not found. Set drop-and-create under %dev, matching what the test profile already does. The dev database is in-memory and discarded when the JVM exits, so there is nothing to preserve across boots; %prod keeps update and never drops anything. Fixes #565
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
🤖 ThrillhouseBot PR SummaryWhat this PR doesAdds %dev.quarkus.hibernate-orm.schema-management.strategy=drop-and-create to the shipped application.properties so dev mode — which uses an explicit in-memory H2 URL and therefore gets no Dev Services database and no schema creation — boots with a working schema instead of failing every DB-backed request, while %prod keeps update. Also adds DevSchemaManagementTest, which binds the shipped properties file under the dev and prod profiles to lock in the dev strategy, the in-memory dev JDBC URL, and the prod update strategy. Changes Overview
Changed Files
Risk Assessment
No new issues found in this PR, but the review cannot be approved until CI is confirmed green.
|
| Check | Type | Status | Detail |
|---|---|---|---|
| trivy | check-run | ⏳ Pending | - |
| actionlint | check-run | ⏳ Pending | - |
| changes | check-run | ⏳ Pending | - |
| test | check-run | ⏳ Pending | - |
| format | check-run | ⏳ Pending | - |
| frontend | check-run | ⏳ Pending | - |
| dependency-review | check-run | ⏳ Pending | - |
Automated review by ThrillhouseBot. Reply with /review to re-run.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|



What type of PR is this?
Description
quarkus.hibernate-orm.schema-management.strategywas set only under%prod. Dev mode points atan explicit H2 URL (
jdbc:h2:mem:thrillhouse), so Quarkus starts no Dev Services database andnothing creates the schema for it, and Hibernate's own default strategy is
none. A fresh clonerunning
./mvnw quarkus:devtherefore booted against a completely empty database: the app started,/q/healthanswered 200, and every database-backed feature failed at runtime.This sets
%dev.quarkus.hibernate-orm.schema-management.strategy=drop-and-create, matching whatsrc/test/resources/application.propertiesalready does for the test profile — which is where thetest suite has been getting its schema all along, and why nothing caught this. The dev database is
in-memory and discarded when the JVM exits, so there is nothing to preserve across boots.
%prodis untouched and keeps
update, so production data is never dropped.Only
src/main/resources/application.propertieschanges; no Java main code and nopom.xml.Related Issues
Fixes #565
How Has This Been Tested?
Manual: real
quarkus:devboot, before and afterBooted the app with
./mvnw quarkus:dev -Dquarkus.http.port=8099 -Dquarkus.observability.enabled=false(JDK 25, dummy GitHub App / AI credentials so
StartupConfigValidatorpasses), then probed theunauthenticated DB-backed endpoint
GET /session/{publicId}.Before — app up, health green, schema absent:
After — clean boot, no schema errors anywhere in the log, and the same request reaches the
database and completes (303 to the sessions page, i.e. "no such session" rather than a crash):
Red/green proof
DevSchemaManagementTestbinds the shippedsrc/main/resources/application.propertiesunder thedevprofile — the profile the suite otherwise never exercises. Verbatim red output on theunfixed properties file:
Green with the fix:
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0.Gates
./mvnw -B spotless:apply— clean./mvnw -B clean compile spotbugs:check spotless:check—BugInstance size is 0, BUILD SUCCESS./mvnw -B clean test—Tests run: 2771, Failures: 0, Errors: 0, Skipped: 0Checklist
Additional Notes
Patch coverage: the only changed main-code file is
application.properties, so the changed-line ∩JaCoCo intersection contains no Java lines or branches — nothing uncoverable and nothing gamed.
%devdrop-and-createcan only ever hit the in-memory H2 instance: the non-prod datasource URL isa fixed
jdbc:h2:mem:literal with no env override, and the test asserts that, so the strategycannot silently start recreating a persistent database if the URL is ever changed.