api: add history record to namespace if it’s deleted or last key is deleted
api: add history record to namespace if it’s deleted or last key is deleted

Stevenah/INF5750,Stevenah/dhis2-datastore-application,Stevenah/INF5750,Stevenah/dhis2-datastore-application