Apply patch to log all SQL queries during installation