Ashhar Ahmad Khan created FINERACT-2754:
-------------------------------------------
Summary: Remove orphaned request_audit_table left behind by
self-service feature removal (missed in FINERACT-2480)
Key: FINERACT-2754
URL: https://issues.apache.org/jira/browse/FINERACT-2754
Project: Apache Fineract
Issue Type: Task
Reporter: Ashhar Ahmad Khan
What is being removed
request_audit_table, defined in
fineract-provider/src/main/resources/db/changelog/tenant/parts/0001_initial_schema.xml
(createTable, an index FK1_request_audit_table_m_client, and a foreign key to
m_client), is dropped via a new Liquibase changeset.
This table backed the SelfServiceRegistration entity, which was mapped with
@Table(name = "request_audit_table") in
fineract-provider/src/main/java/org/apache/fineract/portfolio/self/registration/domain/SelfServiceRegistration.java.
The entity name and the table name did not match, which is why the table
survived the cleanup below.
Why it's dead code
The self-service feature was removed in FINERACT-2480 (PR #5498, merged Mar
13), which deleted SelfServiceRegistration and every other self-service class
in one commit. The accompanying changeset,
0219_remove_self_service_feature.xml, dropped five tables:
m_selfservice_user_client_mapping
m_selfservice_beneficiaries_tpt
m_pocket_accounts_mapping
m_pocket
client_device_registration
request_audit_table was not in that list. All five dropped tables have names
starting with m_selfservice or m_pocket or otherwise clearly reference the
feature, but request_audit_table does not, so it was missed when the original
list of tables to drop was put together.
Confirmed via git log --all -S"request_audit_table" that the table was created
in commit afdc665b52 ("self service registration"), carried through the Flyway
to Liquibase migration in 45bed0a05a, and never touched again until now.
Changes made
Added 0246_drop_request_audit_table.xml, a Liquibase changeset that drops
request_audit_table with cascadeConstraints, following the same pattern as 0219.
No Java changes required. There is no entity, repository, or service
referencing this table; SelfServiceRegistration.java was already deleted in
FINERACT-2480.
Verification
grep -rn "request_audit_table" across the full repo (excluding build/bin)
returns only its own createTable, index, and foreign key definitions in
0001_initial_schema.xml. No other file references it.
grep -rn "RequestAudit" across the full repo returns no results. No JPA entity,
repository, or service class was ever built against this table under any name.
Raised on PR #6234 (FINERACT-2741) by @adamsaghy during review; confirmed there
that the table has no known purpose and should be removed in a separate PR.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)