Changed database to status-based