Fix exceptions path on migration for baremetal database