Skip to content

Migrate JPA persistence to PostgreSQL#5000

Open
heisenbugged wants to merge 1 commit intomasterfrom
codex/postgres-flyway-migration
Open

Migrate JPA persistence to PostgreSQL#5000
heisenbugged wants to merge 1 commit intomasterfrom
codex/postgres-flyway-migration

Conversation

@heisenbugged
Copy link
Copy Markdown
Collaborator

Summary

  • Replace SQLite runtime wiring with PostgreSQL, Flyway Community migrations, and Hibernate schema validation.
  • Add a PostgreSQL production service plus deployment workflow exports for the database password and data directory.
  • Add the baseline PostgreSQL schema, migration notes, and a pgloader transform for SQLite epoch-millisecond timestamps.

Test Plan

  • docker build -t ti4-postgres-flyway-check .
  • docker compose -f docker-compose.production.yml config --quiet with required environment variables set
  • Started postgres:18.3-alpine, booted the app image against an empty database, and verified Flyway applied V1 before Hibernate initialized
  • Ran pgloader from local storage/tibot.db into PostgreSQL using scripts/pgloader-ti4-transforms.lisp, then booted the app image against the imported database and verified Flyway baselined plus Hibernate initialized

Notes

  • Local host Maven compile was not usable because the installed JDK is 21 and this repo compiles with Java 26; Docker build uses the repo-declared Java 26 toolchain.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 7, 2026

🔬 Test Results

✅ JSON Validation

No JSON files changed.


✅ Formatting Checks Passed

All files pass Spotless formatting.


✅ JUnit Tests Passed

All tests passed successfully.

@heisenbugged heisenbugged force-pushed the codex/postgres-flyway-migration branch 3 times, most recently from c1d0a82 to b99d232 Compare May 8, 2026 15:44
@heisenbugged heisenbugged changed the base branch from master to codex/database-persistence-prep May 8, 2026 15:45
@heisenbugged heisenbugged force-pushed the codex/database-persistence-prep branch from 63a3d27 to d64074d Compare May 8, 2026 15:50
@heisenbugged heisenbugged force-pushed the codex/postgres-flyway-migration branch from b99d232 to 26906a0 Compare May 8, 2026 15:50
Base automatically changed from codex/database-persistence-prep to master May 8, 2026 15:55
@heisenbugged heisenbugged force-pushed the codex/postgres-flyway-migration branch 2 times, most recently from bd38c3b to f62c076 Compare May 8, 2026 16:04
@heisenbugged heisenbugged force-pushed the codex/postgres-flyway-migration branch from f62c076 to 7160398 Compare May 8, 2026 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant