reform history to database need