added foreign keys: #MSG-62 fixed