Update manage.py and db upgrade