Fixes #1081 Upgrade Issues

#1081
Fixed everything except the `numvotes` thing (commented out the line for now). There's something like `USAGE` in PostgreSQL but I haven't looked exactly on this.