Skip to content

feat: persistent storage — H2 file-based with JPA entities - #11

Merged
razkevich merged 5 commits into
mainfrom
005-persistent-storage
Apr 9, 2026
Merged

razkevich merged 5 commits into
mainfrom
005-persistent-storage

Conversation

@razkevich

Copy link
Copy Markdown
Owner

Summary

  • Spring profiles: dev (H2 file), test (H2 mem), prod (PostgreSQL placeholder)
  • Bulk API: BulkIngestJob, BulkBatchEntity, BulkRowResultEntity persisted via JPA
  • Metadata API: MetadataResourceEntity, MetadataDeployJobEntity, MetadataRetrieveJobEntity persisted via JPA
  • BulkJobService and MetadataService refactored from ConcurrentHashMap to JPA repositories
  • Extensibility guide: docs/extensibility.md with PostgreSQL migration steps
  • Zero API behavior changes. All 101 tests pass.

Test plan

  • All 101 existing tests pass unchanged (test profile uses H2 mem)
  • Compilation succeeds with mvn -pl service package -DskipTests
  • Reset clears all persistent state across surfaces
  • Manual: start with dev profile, create records, restart, verify records persist

🤖 Generated with Claude Code

arazkevichprodly and others added 5 commits April 9, 2026 13:44
Plan covers 5 features:
- F0: Spring profiles + H2 file-based config
- F1: Bulk job JPA entities (3 new entities, 3 repos)
- F2: Metadata JPA entities (3 new entities, 3 repos)
- F3: Reset behavior with FK-safe truncation
- F4: Extensibility documentation for PostgreSQL migration

Zero new dependencies. Zero API surface changes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- dev: H2 file-based (./data/sfdb) with ddl-auto: update
- test: H2 in-memory with ddl-auto: create-drop
- prod: PostgreSQL placeholder with env var config
- .gitignore: exclude data/ directory
- All 101 tests pass unchanged

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Covers PostgreSQL migration (3 steps, zero code changes), schema
management strategies, repository catalog, and future paths for
auth, multi-tenancy, and monitoring.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Bulk API:
- BulkIngestJob converted from POJO to JPA entity
- New entities: BulkBatchEntity (CSV data), BulkRowResultEntity (per-row results)
- BulkJobService refactored from ConcurrentHashMap to JPA repositories
- 3 new repositories: BulkIngestJobRepository, BulkBatchRepository, BulkRowResultRepository

Metadata API:
- New entities: MetadataResourceEntity, MetadataDeployJobEntity, MetadataRetrieveJobEntity
- MetadataService refactored from 3 ConcurrentHashMaps to JPA repositories
- 3 new repositories: MetadataResourceRepository, MetadataDeployJobRepository, MetadataRetrieveJobRepository
- Existing record types kept as DTOs for controller compatibility

All 101 tests pass. Zero API behavior changes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@razkevich
razkevich merged commit b6f6bfb into main Apr 9, 2026
1 check passed
@razkevich
razkevich deleted the 005-persistent-storage branch April 9, 2026 10:51
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.

2 participants