Add type to foreign keys