Add constraint on deletion of texts and groups