Ugrade db code