Fixes missing DB columns on upgrade

Minor changes: Removed superfluous conditions from if statement and
changed auto-generated x's to version number.