Forums

Django project migrate django.db.utils 1146 Table xx doesn't exist

I downloaded source for an existing (working) project from git, and followed the steps in DeployExistingDjangoProject. All seems ok, until I get to ./manage.py migrate, where I keep getting an error saying django.db.utils.ProgrammingError: (1146, "Table 'ibowditch$kvbfb.personnel_member' doesn't exist"). This is the first model in my models.py. I thought migrate would create models for me, but it doesn't seem to do that. The error log says: Invalid HTTP_HOST header: 'ibowditch.pythonanywhere.com'. You may need to add u'ibowditch.pythonanywhere.com' to ALLOWED_HOSTS I tried adding ALLOWED_HOSTS = ['ibowditch.pythonanywhere.com' ] to my settings.py, but that didn't fit it, nor did ['*'] I'm running python 2.7 in a virtual environment called personnel-virtual-env. Any suggestions on how I can fix this? Thanks, IanB

Are you sure you have migration files for the model? ./manage.py migrate runs existing migrations, but it doesn't create them -- you use ./manage.py makemigrations for that.