Fix the upgrade migration of custom profile fields in #2545

The upgrade_2-1_postgresql.sql changes are untested, but do match the changes to upgrade_2-1_mysql.sql that are tested and confirmed to fix the upgrade issues in #2545.

Signed-off-by: Noteworthy Software, Inc <online@noteworthysoftware.com>
I didn't know that was done. The easiest way to get around this issue is to check for 2.1 in the version string and skip those sections if it's not "2.1 dev0".