merger improvements

This commit is contained in:
2026-03-15 03:24:00 -04:00
parent d4347072f2
commit 6632570712
7 changed files with 86 additions and 3302 deletions

View File

@ -1159,7 +1159,22 @@
" 'id', t1_obj_t3.id,",
" 'is_primary', t1_obj_t1.is_primary,",
" 'name', t1_obj_t3.name,",
" 'type', t1_obj_t3.type)",
" 'target',",
" (SELECT jsonb_build_object(",
" 'archived', t1_obj_t3_target_t2.archived,",
" 'created_at', t1_obj_t3_target_t2.created_at,",
" 'id', t1_obj_t3_target_t2.id,",
" 'name', t1_obj_t3_target_t2.name,",
" 'number', t1_obj_t3_target_t1.number,",
" 'type', t1_obj_t3_target_t2.type",
" )",
" FROM agreego.phone_number t1_obj_t3_target_t1",
" JOIN agreego.entity t1_obj_t3_target_t2 ON t1_obj_t3_target_t2.id = t1_obj_t3_target_t1.id",
" WHERE",
" NOT t1_obj_t3_target_t1.archived",
" AND t1_obj_t3_target_t1.parent_id = t1_obj_t3.id),",
" 'type', t1_obj_t3.type",
")",
"FROM agreego.contact t1_obj_t1",
"JOIN agreego.relationship t1_obj_t2 ON t1_obj_t2.id = t1_obj_t1.id",
"JOIN agreego.entity t1_obj_t3 ON t1_obj_t3.id = t1_obj_t2.id",

File diff suppressed because it is too large Load Diff