Getting error in migrate

21 views
Skip to first unread message

Mansi Thakkar

unread,
May 9, 2018, 2:21:24 PM5/9/18
to Django users
Hello Everyone, 

I am trying to deploy my project using pythonanywhere. I got an error while writing this command python manage.py migrate. 
Here is attached picture of my error. Please help me solving this problem .
Thanks. 

Best Regards, 
Mansi Thakkar
migrationError.png

Pradeep Sharma

unread,
May 9, 2018, 2:41:36 PM5/9/18
to Django users
Did u run the command of py manage.py makemigrations?

James Farris

unread,
May 9, 2018, 3:24:13 PM5/9/18
to django...@googlegroups.com
To be absolutely clear, you need to make sure if you made changes to models.py you need to run
$ python manage.py makemigrations
Then
$ python manage.py migrate

-James

Sent from my mobile device

> On May 9, 2018, at 11:26 AM, Pradeep Sharma <pradeeps...@gmail.com> wrote:
>
> Did u run the command of py manage.py makemigrations?
>
> --
> You received this message because you are subscribed to the Google Groups "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
> To post to this group, send email to django...@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/030d5c70-d65a-4707-ba4d-669b7317713c%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Mansi Thakkar

unread,
May 9, 2018, 10:05:34 PM5/9/18
to django...@googlegroups.com
Yes I did.


On Wed, May 9, 2018 at 2:26 PM, Pradeep Sharma <pradeeps...@gmail.com> wrote:
Did u run the command of py manage.py makemigrations?
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.

To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.

Mansi Thakkar

unread,
May 9, 2018, 10:05:41 PM5/9/18
to django...@googlegroups.com
Yes I did the same thing. I run python manage.py makemigrations first and then python manage.py migrate.

On Wed, May 9, 2018 at 3:23 PM, James Farris <jamesa...@gmail.com> wrote:
To be absolutely clear, you need to make sure if you made changes to models.py you need to run
$ python manage.py makemigrations
Then
$ python manage.py migrate

-James

Sent from my mobile device

> On May 9, 2018, at 11:26 AM, Pradeep Sharma <pradeeps...@gmail.com> wrote:
>
> Did u run the command of py manage.py makemigrations?
>
> --
> You received this message because you are subscribed to the Google Groups "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.

> To post to this group, send email to django...@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/030d5c70-d65a-4707-ba4d-669b7317713c%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.

To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.

Pradeep Sharma

unread,
May 9, 2018, 10:21:22 PM5/9/18
to Django users
I think the problem is that you have already a class brand in your model and you are trying to create other class name brand in your project models..so i suggest check your models.py..

Gerald Brown

unread,
May 9, 2018, 11:52:51 PM5/9/18
to django...@googlegroups.com

Some times you will need to run ./manage.py makemigrations <app name> and then ./manage.py migrate <app name>. 

By including the <app name> it will only makemigration and migrate for a single application instead of for all of the applications. 

I have found that this helps as I too was having problems with makemigration and migrate.

Also I found it is shorter to leave off the python and use ./manage.py xxxx.  Saves a few keystrokes.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.

To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
Reply all
Reply to author
Forward
0 new messages