How to prevent partnership future conflictions?

Being in a partnership doesn’t mean that you both will supprot each others till death, in fact, issues and troubles with a partner is worse than having your own issues, what steps could you do to protect yourself from those troubles and if any of it happens ?