pub fn lww_conflict_handler(
conflict_type: ConflictType,
ctx: &ConflictContext,
schema: &TableSchema,
tracker: &mut ConflictTracker,
) -> ConflictActionExpand description
The production conflict handler for apply_changeset_with_context.
Rules:
- DATA (same row, both sides edited): compare
_updated_at. Newer wins. Forrelease_files, records the row ID so device-specific columns can be restored by the caller. - NOTFOUND (row deleted locally, incoming UPDATE): OMIT (delete wins).
- CONFLICT (row exists, incoming INSERT): compare
_updated_at. Newer wins. - CONSTRAINT (FK violation): OMIT and track for retry.
- FOREIGN_KEY: OMIT (deferred FK check failure, handled by retry).