Add ForeignKey supoort to sql output