Updated the averages code to handle better migrate db
Merge branch 'master' of github.com:hacktm/Smart-City-Piata-Mea