Add foreign keys to table objects