Skip to content

Commit

Permalink
feat: add delete clause for data_record and contact
Browse files Browse the repository at this point in the history
  • Loading branch information
witash committed Aug 1, 2024
1 parent 9daff5c commit a623626
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions models/contacts/contact.sql
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ INNER JOIN
ON source_table._id = document_metadata.uuid
WHERE
document_metadata.doc_type IN ('contact', 'clinic', 'district_hospital', 'health_center', 'person')
AND document_metadata._deleted = false
{% if is_incremental() %}
AND document_metadata.saved_timestamp >= {{ max_existing_timestamp('saved_timestamp') }}
{% endif %}
1 change: 1 addition & 0 deletions models/forms/data_record.sql
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ INNER JOIN
ON source_table._id = document_metadata.uuid
WHERE
document_metadata.doc_type = 'data_record'
AND document_metadata._deleted = false
{% if is_incremental() %}
AND document_metadata.saved_timestamp >= {{ max_existing_timestamp('saved_timestamp') }}
{% endif %}

0 comments on commit a623626

Please sign in to comment.