Fixed #23338 -- Added warning when unique=True on ForeignKey

This PR is similar to #3196 but with the tests and the updated documentation as requested.