Add missing foreign keys

And upgrade foreigner
Merge pull request #237 from tablexi/missing_foreign_keys

Add missing foreign keys