Update makedb.py to try and figure out why foreign keys aren't working