Tidying up the SQL scripts, better handling null ints from the database [TFS Changeset #64917]
Fixes 16705. Still experimental. If running 4.1 beta remember to add the contents of the 4_1upgrade sql script [TFS Changeset #63889]