Data Layer low complexity mobile
0
Dependencies
1
Dependents
0
Entities
0
Integrations

Description

Drift local database table mirroring the backend relatives table, storing each relative with a foreign key to the parent contact. Supports offline-first creation via the mutation outbox with SQLCipher encryption and server ID mapping for offline-created records.

Feature: Relative Contact Registration

relatives

Sources & reasoning

Dedicated Drift table required for offline-first local storage of relative records. Relatives are full contact subjects with their own CRUD lifecycle, not embedded sub-fields, so they require an independent table with mutation outbox support matching the contacts area pattern.

No source references — this artifact was included based on reasoning alone (see above).

Responsibilities

  • Persist relative records locally with FK reference to parent contact
  • Queue offline create/update/delete mutations via mutation outbox
  • Store relationship role, name, phone, and optional extended fields per relative
  • Map server-issued IDs back to locally created records after sync

Interfaces

insertRelative(Relative)
getRelativesByContact(contactId)
updateRelative(relativeId, fields)
deleteRelative(relativeId)
getPendingMutations()

Relationships

Dependents (1)

Components that depend on this component