Forums

Django 1.8 Project Makemigration/Migrate

Hello!

I have a situation, I'm making some changes on the database on my project but when I try to manage.py makemigration or migrate it says: Unknown command: 'makemigration', and if I try just to syncdb it says: django.db.utils.OperationalError: no such column: django_content_type.name.

I will appreciate some help with this.

Are you using a virtualenv? If so, is it active in the bash shell where you're running the migration?

How do I know if it is active? cause what I do is to open up a bash console in the project folder and then run the commands.

If you run which python and it is something like /usr/bin/python instead of something like /the/path/to/my/virtualenv/python then you are not using/"inside of" your virtualenv.

ok, I ran it and got /usr/bin/python... now how do I change that to what it should be?

EDIT well thanks!! I really appreciate your help, I remember that to "work on" the virtualenv I need to run the command:

workon django18

django18 in this case cause thats the name I put on my virtualenv.

Again thanks very much, now when I run:

which python

I get /the/path/to/my/virtualenv/python, and when I run:

python manage.py makemigration "myapp"

I get the proper response.

hooray! :)