more minor debugging of tests - all passing again
updates to db.py to migrate to postgresql