diff --git a/scripts/update-tracked-entity-attribute-values-in-legacy-data.sql b/scripts/update-tracked-entity-attribute-values-in-legacy-data.sql index 52b4bdc..4a24ed6 100644 --- a/scripts/update-tracked-entity-attribute-values-in-legacy-data.sql +++ b/scripts/update-tracked-entity-attribute-values-in-legacy-data.sql @@ -20,6 +20,7 @@ BEGIN FROM programstageinstance AS psi WHERE + psi.deleted = false AND psi.programinstanceid IN ( SELECT pi.programinstanceid