Converting class variable api stats to DB