import carddav: a card in two address books is one card in both #35

Merged
jcoffey-dev merged 1 commits from fix/card-in-two-address-books into main 2026-10-30 15:13:52 +00:00
1 Commits
Author SHA1 Message Date
jcoffey-dev 974c7745cf import carddav: a card in two address books is one card in both
ci / test (pull_request) Skipped
github/ci (branch) GitHub Actions
ci / github (pull_request) Successful in 2m51s
ci / announce (pull_request) Skipped
The archive keeps one row per card UID, so a CardDAV server that lists
the same card in two address books made the second INSERT fail, on every
run. The second book now joins the first row's address_book_ids, and
sync_id_dav lets two server items map to one local row (older archives
are rebuilt without that UNIQUE). A vanished item takes only its book
off a card another item still maps; deleting an address book deletes
only the cards no other book holds.

The in-memory DAV server from mock_export_dav moves to tests/fake_dav,
gaining multiget and DELETE, and drives a new import test that fails on
the old code.
2026-10-30 08:08:24 -07:00