Repository navigation
remove deleted files from oc_share - #5129
Conversation
There was a problem hiding this comment.
executeAudited can throw exceptions which will break the whole hook processing - right?
|
@schiesbn any additional mechanisms planned? What if there already exist bad entries in the table? THX |
We could provide a update script which checks for all entries in oc_shares if the source still exists and remove the row if not. |
I think it can happen over time as well - there is no real guarantee the hooks for deletion are fired under each condition. Maybe we need a delete of rows as we hit the error that the share source could not be found |
But if this happens we have a bug which needs to be fixed. This bug fix than can contain again a upgrade script to fix already broken installations. |
|
Test passed. |
|
👍 An update hook should fullfil the integrity of the tables. If there appear other problems and there are still orphaned entities in the database we have to fix the reason and not fix the effect of the reason. For this additional fix we have to fix previous broken installations by another update hook. Just my two cents. |
|
👍 |
remove deleted files from oc_share
|
backported to stable5: 632a2e1...6f617bd |
remove shares from database for a given file if the file was deleted, possible fix for #4836