fix rendering of foreign key constraint when using a metadata schema
(hopefully) make the code a bit more readable
Merge remote-tracking branch 'github/pr/14' into pr14
changelog for pr github:14