Antonio-RiveroMartnez opened a new pull request, #32759:
URL: https://github.com/apache/superset/pull/32759

   ### SUMMARY
   With the introduction of FAB 4.6.0 the `ab_permission_view_role` and 
`ab_user_role` tables are using `ON CASCADE` for deletions, however, this 
change is only applied in newly created DBs as there's no migration to 
incorporate such changes into superset.
   
   Without these changes it's not possible to delete Roles due to related data 
still existing (Integrity error).
   
   This PR is adding a migration to recreate those foreign keys with the proper 
deletion treatment and thus fixing the role deletion behavior.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   Error:
   
![error](https://github.com/user-attachments/assets/d0c8330e-ad84-41d1-92d9-91a190ce9412)
   
   Fix:
   
![fix](https://github.com/user-attachments/assets/7f928fa6-c393-4c5b-b354-60d428aed18b)
   
   
   ### TESTING INSTRUCTIONS
   <!--- Required! What steps can be taken to manually verify the changes? -->
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [X] Includes DB Migration (follow approval process in 
[SIP-59](https://github.com/apache/superset/issues/13351))
     - [X] Migration is atomic, supports rollback & is backwards-compatible
     - [X] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to