Rename table filemanager_mediafiles to filemanager_owners
Add delete owners before delete mediafile behavior