Using column name specified in Columns in foreign key constraint

I had an issue where column names were prefixed to remove ambiguity, but the prefixed names weren't being used in the foreign key constraints (leading to "unknown column" errors when creating the tables). This should fix it.