Merging two databases without borking it

This is a notoriously difficult thing to solve in WordPress because of how the database is constructed. I have since long given up on being able to merge dev -> staging -> prod.

Instead, I track any and all changes I make to the database in my dev environment, manually apply those to the production database when that time comes.

I know it’s not a nice answer, but it’s the only one you’ll get when you need assurances that the DB won’t be borked.