Add support for ForeignKeys with primary_key=True
Make sure env variables are set before pre deploy commands are run
Merge commit '477bf4f'