Good luck, whatever you decide.
This is not legal advice, but personal experience.
I too bought a house when engaged (but not yet married) and his credit was shot (bankruptcy, etc.).
Long story short, I'm glad it was in my name only - downpayment was from the home I previously owned - and it saved me from fighting for what I worked hard for when this marriage ended. He'd already "spent his half" before he realized the facts...
If you buy before you're married and make payments from an account with your name only (no commingling of your and his funds in this one), you should retain full ownership, even if "the worst" happens. However, any
increase in value during the marriage would be considered marital property and thus subject to whatever distribution is arrived at.