You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@fineract.apache.org by "AshharAhmadKhan (via GitHub)" <gi...@apache.org> on 2026/08/05 17:46:09 UTC

[PR] FINERACT-2741: Standardize email address column length across most tables [fineract]

AshharAhmadKhan opened a new pull request, #6234:
URL: https://github.com/apache/fineract/pull/6234

   ## 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)`:
   
   | Table | Column | Before | After |
   |---|---|---|---|
   | `m_appuser` | `email` | VARCHAR(100) | VARCHAR(254) |
   | `m_client` | `email_address` | VARCHAR(150) | VARCHAR(254) |
   | `m_staff` | `email_address` | VARCHAR(150) | VARCHAR(254) |
   | `scheduled_email_messages_outbound` | `email_address` | VARCHAR(50) | VARCHAR(254) |
   
   Added a new Liquibase changeset (`0245_standardize_email_address_column_length.xml`, registered in `changelog-tenant.xml`) rather than editing `0001_initial_schema.xml`, since that file is already-released history.
   
   Updated the following to stay in lockstep with the new column widths:
   - JPA `@Column(length=...)` on `AppUser`, `Client`, `Staff`, `EmailMessage`
   - `UserDataValidator.notExceedingLengthOf(...)` (create + update paths)
   - `@Length(max=...)` on `StaffCreateRequest` and `StaffUpdateRequest`
   
   **Out of scope:**
   - `m_adhoc.email` (already `VARCHAR(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.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] FINERACT-2741: Standardize email address column length across most tables [fineract]

Posted by "AshharAhmadKhan (via GitHub)" <gi...@apache.org>.
AshharAhmadKhan commented on PR #6234:
URL: https://github.com/apache/fineract/pull/6234#issuecomment-5241564976

   Hey @adamsaghy,
   
   Could you please let me know how I should proceed here? Do we need to trigger any more checks, or do I need to make any other changes from my side? Thanks!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] FINERACT-2741: Standardize email address column length across most tables [fineract]

Posted by "AshharAhmadKhan (via GitHub)" <gi...@apache.org>.
AshharAhmadKhan commented on code in PR #6234:
URL: https://github.com/apache/fineract/pull/6234#discussion_r3751015551


##########
fineract-provider/src/main/resources/db/changelog/tenant/parts/0245_standardize_email_address_column_length.xml:
##########
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements. See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership. The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License. You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied. See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+-->
+<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
+                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+                   xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.3.xsd">
+    <!-- FINERACT-2741: Standardize email address column length to VARCHAR(254) (RFC 5321 max) -->
+    <changeSet author="fineract" id="1">
+        <modifyDataType tableName="m_appuser" columnName="email" newDataType="VARCHAR(254)"/>
+        <modifyDataType tableName="m_client" columnName="email_address" newDataType="VARCHAR(254)"/>
+        <modifyDataType tableName="m_staff" columnName="email_address" newDataType="VARCHAR(254)"/>
+        <modifyDataType tableName="scheduled_email_messages_outbound" columnName="email_address" newDataType="VARCHAR(254)"/>

Review Comment:
   Sounds good, working on it.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] FINERACT-2741: Standardize email address column length across most tables [fineract]

Posted by "adamsaghy (via GitHub)" <gi...@apache.org>.
adamsaghy commented on code in PR #6234:
URL: https://github.com/apache/fineract/pull/6234#discussion_r3750472136


##########
fineract-provider/src/main/resources/db/changelog/tenant/parts/0245_standardize_email_address_column_length.xml:
##########
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements. See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership. The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License. You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied. See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+-->
+<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
+                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+                   xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.3.xsd">
+    <!-- FINERACT-2741: Standardize email address column length to VARCHAR(254) (RFC 5321 max) -->
+    <changeSet author="fineract" id="1">
+        <modifyDataType tableName="m_appuser" columnName="email" newDataType="VARCHAR(254)"/>
+        <modifyDataType tableName="m_client" columnName="email_address" newDataType="VARCHAR(254)"/>
+        <modifyDataType tableName="m_staff" columnName="email_address" newDataType="VARCHAR(254)"/>
+        <modifyDataType tableName="scheduled_email_messages_outbound" columnName="email_address" newDataType="VARCHAR(254)"/>

Review Comment:
   No idea, but lets change it. As a separate ticket if nothing is using this, lets remove it.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] FINERACT-2741: Standardize email address column length across most tables [fineract]

Posted by "adamsaghy (via GitHub)" <gi...@apache.org>.
adamsaghy commented on code in PR #6234:
URL: https://github.com/apache/fineract/pull/6234#discussion_r3750390783


##########
fineract-provider/src/main/resources/db/changelog/tenant/parts/0245_standardize_email_address_column_length.xml:
##########
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements. See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership. The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License. You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied. See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+-->
+<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
+                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+                   xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.3.xsd">
+    <!-- FINERACT-2741: Standardize email address column length to VARCHAR(254) (RFC 5321 max) -->
+    <changeSet author="fineract" id="1">
+        <modifyDataType tableName="m_appuser" columnName="email" newDataType="VARCHAR(254)"/>
+        <modifyDataType tableName="m_client" columnName="email_address" newDataType="VARCHAR(254)"/>
+        <modifyDataType tableName="m_staff" columnName="email_address" newDataType="VARCHAR(254)"/>
+        <modifyDataType tableName="scheduled_email_messages_outbound" columnName="email_address" newDataType="VARCHAR(254)"/>

Review Comment:
   `request_audit_table` is missing



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] FINERACT-2741: Standardize email address column length across most tables [fineract]

Posted by "AshharAhmadKhan (via GitHub)" <gi...@apache.org>.
AshharAhmadKhan commented on code in PR #6234:
URL: https://github.com/apache/fineract/pull/6234#discussion_r3750451910


##########
fineract-provider/src/main/resources/db/changelog/tenant/parts/0245_standardize_email_address_column_length.xml:
##########
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements. See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership. The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License. You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied. See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+-->
+<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
+                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+                   xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.3.xsd">
+    <!-- FINERACT-2741: Standardize email address column length to VARCHAR(254) (RFC 5321 max) -->
+    <changeSet author="fineract" id="1">
+        <modifyDataType tableName="m_appuser" columnName="email" newDataType="VARCHAR(254)"/>
+        <modifyDataType tableName="m_client" columnName="email_address" newDataType="VARCHAR(254)"/>
+        <modifyDataType tableName="m_staff" columnName="email_address" newDataType="VARCHAR(254)"/>
+        <modifyDataType tableName="scheduled_email_messages_outbound" columnName="email_address" newDataType="VARCHAR(254)"/>

Review Comment:
   Hey Adam, thanks for pointing this out.
   
   As mentioned in the description, I couldn’t find any backing entity or code reference for `request_audit_table`, so I assumed it was unnecessary legacy schema and left it unchanged.
   
   What exactly is `request_audit_table` used for, by the way? If it’s still useful, I can add the email column change for consistency. If not, I can leave it for a separate cleanup ticket to remove it.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] FINERACT-2741: Standardize email address column length across most tables [fineract]

Posted by "adamsaghy (via GitHub)" <gi...@apache.org>.
adamsaghy merged PR #6234:
URL: https://github.com/apache/fineract/pull/6234


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] FINERACT-2741: Standardize email address column length across most tables [fineract]

Posted by "adamsaghy (via GitHub)" <gi...@apache.org>.
adamsaghy closed pull request #6234: FINERACT-2741: Standardize email address column length across most tables
URL: https://github.com/apache/fineract/pull/6234


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] FINERACT-2741: Standardize email address column length across most tables [fineract]

Posted by "adamsaghy (via GitHub)" <gi...@apache.org>.
adamsaghy commented on code in PR #6234:
URL: https://github.com/apache/fineract/pull/6234#discussion_r3750472136


##########
fineract-provider/src/main/resources/db/changelog/tenant/parts/0245_standardize_email_address_column_length.xml:
##########
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements. See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership. The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License. You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied. See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+-->
+<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
+                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+                   xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.3.xsd">
+    <!-- FINERACT-2741: Standardize email address column length to VARCHAR(254) (RFC 5321 max) -->
+    <changeSet author="fineract" id="1">
+        <modifyDataType tableName="m_appuser" columnName="email" newDataType="VARCHAR(254)"/>
+        <modifyDataType tableName="m_client" columnName="email_address" newDataType="VARCHAR(254)"/>
+        <modifyDataType tableName="m_staff" columnName="email_address" newDataType="VARCHAR(254)"/>
+        <modifyDataType tableName="scheduled_email_messages_outbound" columnName="email_address" newDataType="VARCHAR(254)"/>

Review Comment:
   No idea, but lets change it. As a separate ticket if nothing is using this, lets remove it.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] FINERACT-2741: Standardize email address column length across most tables [fineract]

Posted by "adamsaghy (via GitHub)" <gi...@apache.org>.
adamsaghy commented on code in PR #6234:
URL: https://github.com/apache/fineract/pull/6234#discussion_r3750482918


##########
fineract-provider/src/main/resources/db/changelog/tenant/parts/0245_standardize_email_address_column_length.xml:
##########
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements. See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership. The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License. You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied. See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+-->
+<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
+                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+                   xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.3.xsd">
+    <!-- FINERACT-2741: Standardize email address column length to VARCHAR(254) (RFC 5321 max) -->
+    <changeSet author="fineract" id="1">
+        <modifyDataType tableName="m_appuser" columnName="email" newDataType="VARCHAR(254)"/>
+        <modifyDataType tableName="m_client" columnName="email_address" newDataType="VARCHAR(254)"/>
+        <modifyDataType tableName="m_staff" columnName="email_address" newDataType="VARCHAR(254)"/>
+        <modifyDataType tableName="scheduled_email_messages_outbound" columnName="email_address" newDataType="VARCHAR(254)"/>

Review Comment:
   No idea, what it is for... probably can be removed in a separate PR.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] FINERACT-2741: Standardize email address column length across most tables [fineract]

Posted by "AshharAhmadKhan (via GitHub)" <gi...@apache.org>.
AshharAhmadKhan commented on PR #6234:
URL: https://github.com/apache/fineract/pull/6234#issuecomment-5207679272

   hey @adamsaghy , checked both failures:
   
   - `run-liquibase-ddl-safety`: flags the intentional `modifyDataType` on `m_appuser.email` (and related columns). This is expected since this PR widens existing columns. Could you add the `ddl-safety-override` label if it looks good?
   
   - `The failure (Shard 1) is unrelated to my code. Could you retrigger when free? Thanks!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org