Add sql foreign constraints