db fixes to make v4.0.0 run on MAMP
Merge branch 'andysprout-master'