Rock Unmerge Tool — recover from accidental person merges (free + open source)

If you've ever accidentally merged the wrong two people in Rock and watched a person's attendance, giving, group memberships, and history vanish into someone else's record, you know how painful that is to fix by hand.

We hit this at Crossings Church and built a desktop tool to fix it cleanly. Sharing it back with the community.

What it does

Connects to two databases — your live Rock production DB and a pre-merge point-in-time restore — walks you through a five-step wizard, and pulls the merged-away person's history off the wrong record and onto a new blank record you've recreated for them. All writes happen in a single transaction; nothing is committed until you've reviewed the impact preview and explicitly confirmed.

Built on top of Pastor Jeremy Parker's original Unmerge_Person_with_Alias_Detection.sql script — same logic, same defensive JOIN-by-Id semantics that protect post-merge activity from accidentally moving — but wrapped in a guided UI with full audit logging.

Key features

  • Five-step wizard: Connect → Identify → Preview → Commit → Results
  • Pre-commit dry-run shows you every table and exact row count that will change before anything is written
  • Single transaction with auto-rollback on any error
  • Per-commit audit log written to disk: timestamps, OS user, both connection labels, every SQL statement executed, all row counts, success/failure
  • Defensive verification — catches it if the unmerge target's aliases don't actually point at the wrong-recipient you selected (a common "I've got the wrong person" mistake)
  • Restores profile basics from the backup record: email, gender, birthdate, graduation year, marital status, profile picture, mobile phone
  • Restores History.EntityId for person-type history entries (an extension beyond the original script — closes a known gap so audit-trail entries about a person follow them back)
  • Test mode with synthetic SQLite databases seeded with an "Alice merged into Bob" scenario, so anyone can practice the workflow end-to-end without real data
  • Works against Azure SQL and on-prem SQL Server (uses bridge mode — no cross-database queries required)

Validate before production

Strongly recommended: restore production to two new databases via PITR — one recent, one from before the accidental merge — and run the full unmerge against that pair first. Verify in Rock pointed at the test DB. Only after that pass should you point the tool at actual production with a fresh backup. Full validation walkthrough in the README.

Download

Download Here

  • Mac (Apple Silicon and Intel) — Apple-signed and notarized, opens with no security warnings
  • Windows — unsigned for now (Windows code-signing cert in process); SmartScreen will say "More info → Run anyway" the first launch

Source + License

Github Link

Released under GPL v3 — free to use, modify, and redistribute. The license is intentional — no one can repackage and sell it, and any improvements anyone makes have to stay free for the community.

Feedback welcome

Bug reports, feature ideas, validation against your own data — all welcome via GitHub Issues. Especially curious to hear from anyone whose Rock install has custom plugins that add PersonAliasId columns to non-standard tables, since the schema-discovery should pick those up too.