Fix up some db stuff
Merge branch 'master' of github.com:Code4SA/pmg-cms-2