prior to deleting database