Our domain name changed, where do I edit the hostname?

Oh, so remapping posts is good to know (that guide you linked to didn’t appear in my googling) – but in trying it, I get this error:

Error: ERROR:  duplicate key value violates unique constraint "index_incoming_domains_on_name_and_https_and_port"
DETAIL:  Key (name, https, port)=(caddy.community, t, 443) already exists.
The remap has only been partially applied due to the error above. Please re-run the script again.

Doing what it says and re-running the script again shows the same error.