migrateImagesToSwift: get SHA-1 hash from database