# 11-Apr-2026 — harden migration to avoid deleting live CMS pages and dedupe footer by href [#214](https://github.com/nbarrett/ngx-ramblers/issues/214)

## [build 585](https://github.com/nbarrett/ngx-ramblers/actions/runs/24284115184) — [commit fed150e](https://github.com/nbarrett/ngx-ramblers/commit/fed150e774a8c374c0c567e5ef831c5007083e00)

_____

The seed-default-privacy-policy migration had two bugs that combined to
break Winchester Walking Weekend's privacy policy page and leave Bolton
with a dead footer link:

1. Unconditional `deleteOne({path: "privacy-policy"})` was wiping any
page sitting at that path, including live CMS content. In practice
the old hardcoded component never backed its content with a
pageContent document (it loaded directly from contentText), so this
cleanup was a no-op on every environment except ones where a real
CMS page had been deliberately placed at the root path. Dropped the
deletion entirely.

2. Footer dedupe was matching on the exact title "Privacy Policy"
(case-insensitive), which missed existing entries titled differently
(e.g. Winchester Walking Weekend's "Privacy and cookie policy"),
leading to duplicate entries after the migration ran. Switched to an
href-based match that recognises any entry pointing at
`privacy-policy` or `about-us/privacy-policy`, and shared the helper
between `up()` and `down()`.

The repair for already-affected environments was applied manually:
Winchester Walking Weekend had its `/privacy-policy` page rebuilt from
the surviving contentText entry, and Bolton had its dead footer entry
removed.