! Fix assorted issues with upgrade on PostgreSQL

Signed-off-by: Michael Eshom <oldiesmann@oldiesmann.us>
Merge pull request #1369 from Oldiesmann/release-2.1

! Fix assorted issues with upgrade on PostgreSQL