fix db function calls from PDO migration