created migrations and models for stats and errors