Skip to content

Remove RDB migrations#844

Open
ericbuckley wants to merge 2 commits into
mainfrom
eb/rdb-migration-cleanup
Open

Remove RDB migrations#844
ericbuckley wants to merge 2 commits into
mainfrom
eb/rdb-migration-cleanup

Conversation

@ericbuckley
Copy link
Copy Markdown
Contributor

@ericbuckley ericbuckley commented May 22, 2026

Description

This pull request removes the RDB liquibase migrations. There was really just 1 migration being applied and that was to correct for an inconsistency in the development database image. Moving that migration to containers/db/initialize makes more sense, as we don't need users to run it.

Additional Notes

  • The 004-rdb directory and associated configurations have been removed. This was necessary to resolve inconsistencies between legacy RDB structures and our current event-driven reporting requirements.
  • The migrate.sh has been upgraded to apply the 005-rdb_modern migrations to EITHER rdb or rdb_modern, depending on the state of the NBS_Configuration table.
  • containers/db/initialize/06-fix-lab-test.sql was added to fix the RDB tables in our development database

Checklist

  • I have ensured that the pull request is of a manageable size, allowing it to be reviewed within a single session.
  • I have reviewed my changes to ensure they are clear, concise, and well-documented.
  • I have updated the documentation, if applicable.
  • I have added or updated test cases to cover my changes, if applicable.

…sion to 16.1

Consolidates reporting database migrations by removing legacy `004-rdb`
scripts and directing both `rdb` and `rdb_modern` targets to use the
unified `005-rdb_modern` changelogs.

Key changes:
- Removed the `004-rdb` SQL scripts and `db.rdb.changelog-16.1.yaml`.
- Implemented dynamic target database detection in `migrate.sh` using
  the environment configuration in `NBS_ODSE`.
- Updated `build.gradle` and changelogs to reflect `NBS_DB_VER` 16.1.
- Streamlined `Dockerfile` and manual deployment scripts (`upgrade_db.sh`,
  `upgrade_db.bat`) to follow the unified migration path.
- Updated `readme.md` and manual deployment documentation to reflect the
  simplified architecture.

This change reduces maintenance complexity and ensures consistent object
deployment regardless of whether the target reporting database is named
`rdb` or `rdb_modern`.
Add an initialization script to apply missing RDB migrations from
R6.0.8. These changes increase the length of various columns in
LAB_TEST, INVESTIGATION, and related tables to VARCHAR(199) to support
longer identifiers and test method codes.

This ensures the local development environment matches the official
database schema used for ELR processing and act_id extensions.

Refs: ND-18353, ND-18817
@ericbuckley ericbuckley self-assigned this May 22, 2026
@ericbuckley ericbuckley marked this pull request as ready for review May 22, 2026 21:45
@ericbuckley ericbuckley requested a review from a team as a code owner May 22, 2026 21:45
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