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

   Problem
   
   Changeset 0231 (merged in #5764) failed on existing tenants with a 
   PostgreSQL foreign key violation:
   
     DELETE FROM m_permission WHERE code='INACTIVATE_CLIENTCHARGE'
     → ERROR: violates foreign key constraint "fk8dedb048103b544b" 
       on table "m_role_permission"
   
   This happened because m_role_permission holds references to m_permission 
   via a foreign key. You cannot delete a permission row while role-permission 
   rows still point to it.
   
   Additionally, the changeset author was set to "ashharahmadkhan" instead 
   of the required "fineract".
   
   Fix
   
   1. Delete orphaned m_role_permission rows first, before deleting the 
      parent m_permission rows.
   2. Change changeset author from "ashharahmadkhan" to "fineract".
   
   Fresh tenants (barebones_db / load_sample_data) were unaffected because 
   those permissions were never assigned to any role. Existing tenants with 
   roles assigned to INACTIVATE_CLIENTCHARGE hit the FK violation on startup.
   
   References
   - JIRA: https://issues.apache.org/jira/browse/FINERACT-2595
   - Original PR: #5764


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to