In RHEL we are using preupgrade-assistant [1] which does this work.
If user write a check script then it will inform user that upgrade is not supported.
The check script can also inform user that e.g. mariadb changed structure
and it's required to execute a convert script or whatever.
Currently now preupgrade-assistant is not available in Fedora.
I discussed with Honza Horak (team lead of databases) about this issues
and can be used in this case.