add compact command on database level