Make some sorely needed changes to the SQL schema, and update the code
[pr0n] / sql /
drwxr-xr-x   ..
-rw-r--r-- 2845 pr0n.sql
-rw-r--r-- 2924 upgrade-v2.40.sql