A couple bug fixes and enhancements

This resolves a couple upgrade problems I ran into when upgrading from 2.05.
A more compact and readable way to write that query might be:

DELETE FROM nt_nameserver_log WHERE output_format NOT IN ('tinydns','djb','nt','bind') OR output_format IS NULL;

Can you explain why that upgrade step is necessary, expected, or advantageous?