Merge pull request #221 from nikbyte/master

Fix some PgSQL schema issues
(cherry picked from commit 671a5bb7af35833fbf1e634e8bd321417ef5aa6a)
Postgres schema regenerated.