FINERACT-2741: Standardize email address column length across most tables - #6234
Open
AshharAhmadKhan wants to merge 1 commit into
Open
Conversation
…bles Widen email address columns to VARCHAR(254) per RFC 5321 max length: - m_appuser.email - m_client.email_address - m_staff.email_address - scheduled_email_messages_outbound.email_address Updates corresponding JPA entity @column annotations, the UserDataValidator length check, and Staff request DTO @Length constraints to match. Out of scope (unchanged): - m_adhoc.email (already VARCHAR(500), exceeds new standard) - request_audit_table.email (no backing entity or code references found; flagged in PR description for reviewer input)
Contributor
Author
|
hey @adamsaghy , checked both failures:
|
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.
JIRA
https://issues.apache.org/jira/browse/FINERACT-2741
Problem
Email address columns across Fineract tables (
m_client,m_staff,m_appuser, etc.) are currently capped at 50–150 characters, falling short of the RFC 5321 maximum of 254 characters. This risks truncating or rejecting valid, longer email addresses.Fix
Widened the following columns to
VARCHAR(254):m_appuseremailm_clientemail_addressm_staffemail_addressscheduled_email_messages_outboundemail_addressAdded a new Liquibase changeset (
0245_standardize_email_address_column_length.xml, registered inchangelog-tenant.xml) rather than editing0001_initial_schema.xml, since that file is already-released history.Updated the following to stay in lockstep with the new column widths:
@Column(length=...)onAppUser,Client,Staff,EmailMessageUserDataValidator.notExceedingLengthOf(...)(create + update paths)@Length(max=...)onStaffCreateRequestandStaffUpdateRequestOut of scope:
m_adhoc.email(alreadyVARCHAR(500)) — exceeds the new standard already; ticket specifies no column sizes are reduced, so left as-is.request_audit_table.email(VARCHAR(100)) — no backing JPA entity or code reference found anywhere in the repo. Appears to be dead/legacy schema. Flagging here for reviewer input on whether to widen for consistency or leave untouched.