[got foreign keys to work, but still need to figure out how to automate their creation]