-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Is your feature request related to a problem? Please describe.
Currently, the simun-backend-core uses embedded Liquibase to manage schema creation and updates automatically at runtime. While this works for development, it limits flexibility in production environments where database changes should be handled explicitly and under stricter control. Additionally, important Liquibase features like CLI usage, rollback, and schema diffing are not currently exposed or documented for operational use.
Describe the solution you'd like
Improve Liquibase integration and tooling around the following use cases:
-
External schema creation and update via Liquibase CLI
- Allow environments (especially PROD) to initialize the database using Liquibase manually via CLI instead of relying on the backend.
- This avoids side effects during app startup and gives DBAs control over when and how schema changes are applied.
-
Support Liquibase rollback operations
- Enable the ability to revert changes using tags or timestamps.
- Useful for recovering from faulty updates or partial deployments.
-
Generate schema diffs between environments
- Use
liquibase diffto compare PRE and PROD environments. - Helps identify unintended differences, detect issues early, and ensure alignment across stages.
- Use
-
Manage changelogs for incremental updates
- Ensure schema evolution is tracked via versioned changelogs.
- Establish and document a clear process for changelog creation, testing, and deployment.
Describe alternatives you've considered
- Keeping the current embedded approach only, but it lacks control, visibility, and reversibility.
- Writing manual SQL scripts, which loses the benefits of Liquibase's structured, versioned change management.
- Relying on third-party migration tools, but Liquibase is already in use and fits the requirements well.
Additional context
These enhancements would allow SITMUN 3 to:
- Follow best practices in DB lifecycle management
- Avoid automatic/uncontrolled schema changes in PROD
- Provide safer, testable, and reversible database deployments
- Empower to use Liquibase consistently across different environments