-- Symmetric SPOUSE_OF: enforce only one row per unordered pair, mirroring the
-- SIBLING_OF index added in V54.
CREATE UNIQUE INDEX unique_spouse_pair ON person_relationships (
    LEAST(person_id, related_person_id),
    GREATEST(person_id, related_person_id)
) WHERE relation_type = 'SPOUSE_OF';
