Also fix SQL fields to use unsigned values as expected in code, otherwise large values will get lost.