You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the project uses SQLite as the database, which is excellent for local development simplicity (single file, no setup, zero external dependencies). However, SQLite has limitations for production-like scenarios:
❌ Missing advanced features (stored procedures, replication, etc.)
❌ Not representative of real-world deployment environments
The project needs a production-ready database solution with a unified initialization strategy that works identically for both databases.
Depends on: #130 (Implement Flyway for database migrations)
Proposed Solution
Add PostgreSQL support alongside SQLite, leveraging the Flyway migration infrastructure introduced in #130. Both databases will use the same versioned migrations on startup. This provides:
Dual database support: PostgreSQL for Docker/production, SQLite for local dev and testing
Confirm that the Flyway migrations introduced in #130 use SQL compatible with both SQLite and PostgreSQL (standard DDL, no provider-specific syntax). Address any dialect differences if found.
Phase 5: Documentation Updates
Update README.md:
Add "Database Options" section explaining SQLite vs PostgreSQL use cases
Problem
Currently, the project uses SQLite as the database, which is excellent for local development simplicity (single file, no setup, zero external dependencies). However, SQLite has limitations for production-like scenarios:
The project needs a production-ready database solution with a unified initialization strategy that works identically for both databases.
Proposed Solution
Add PostgreSQL support alongside SQLite, leveraging the Flyway migration infrastructure introduced in #130. Both databases will use the same versioned migrations on startup. This provides:
Suggested Approach
Phase 1: Docker Infrastructure Setup
Configure Docker Compose to orchestrate PostgreSQL alongside the application service.
Update
compose.yaml:Create
.env.example:Phase 2: Dependencies
Add to
pom.xml:Note: Flyway dependencies are added as part of #130.
Phase 3: Application Configuration
Update
application.properties(local/SQLite — no changes needed if #130 already configures Flyway).Create
application-production.properties:Phase 4: Verify Migration Compatibility
Confirm that the Flyway migrations introduced in #130 use SQL compatible with both SQLite and PostgreSQL (standard DDL, no provider-specific syntax). Address any dialect differences if found.
Phase 5: Documentation Updates
Update
README.md:POSTGRES_PASSWORD,SPRING_PROFILES_ACTIVE)docker compose up./mvnw spring-boot:run(SQLite via Flyway from Implement Flyway for database migrations #130)Acceptance Criteria
Docker Compose
postgresservice defined with health checkpostgres-data).env.examplecommitted withPOSTGRES_PASSWORDplaceholder.envis git-ignoredApplication Code
postgresqlJDBC driver added topom.xmlapplication-production.propertiesconfigures PostgreSQL datasourceSPRING_PROFILES_ACTIVE=productionactivates PostgreSQL in DockerTesting
Documentation
.env.exampleexplains required variablesReferences