FINERACT-535: Allow the same name of teller if its from different bra…#6087
Open
dr-fuch wants to merge 1 commit into
Open
FINERACT-535: Allow the same name of teller if its from different bra…#6087dr-fuch wants to merge 1 commit into
dr-fuch wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR resolves an issue with teller name uniqueness restrictions. Previously, the unique key constraint (
m_tellers_name_unq) prevented creating tellers with the same name across different offices (e.g., having a "TELLER 1" in both OFFICE 1 and OFFICE 2).The unique key has been updated to
m_tellers_office_name_unqto include theoffice_idin the constraint scope, allowing duplicate teller names as long as they belong to different branches.Changes Included
Database Schema & Migrations:
0242_update_m_tellers_unique_key.xmlto safely drop the old constraint and apply the new composite unique key (name,office_id) for both MySQL and PostgreSQL productive instances.changelog-tenant.xml.barebones_db.sqlandload_sample_data.sql) to reflect the new constraint name.Service & Error Handling:
TellerWritePlatformServiceJpaImpl. It now correctly detects and intercepts the newm_tellers_office_name_unqconstraint violation message instead of the legacy one.Automated Tests:
TellerWritePlatformServiceJpaImplTestto cover the new exception handling paths and ensure regression safety.Checklist
Please make sure these boxes are checked before submitting your pull request - thanks!
Your assigned reviewer(s) will follow our guidelines for code reviews.