django makemigrations not working

361 views
Skip to first unread message

Gerald Brown

unread,
May 5, 2018, 6:34:18 AM5/5/18
to Django users
I have dropped my database, deleted all migrations directories and when I run ./manage.py makemigrations I get the message "No changes detected".

I am using Django 2.04 with Python 3.5.

Any ideas why this is happening?

Thanks.

Hervé Edorh

unread,
May 5, 2018, 9:17:19 AM5/5/18
to Django users
Do you create another database?

Gerald Brown

unread,
May 5, 2018, 9:23:47 AM5/5/18
to django...@googlegroups.com
Yes. I dropped it and then recreated it.

Then ran "makemigrations" & "migrate". Migrate is now giving me a lot of
errors.

Funny that all of the errors that show up are in lines that contain
"**/site-packages/django/**", NOT in any lines of MY code.


On Saturday, 05 May, 2018 09:17 PM, Hervé Edorh wrote:
> Do you create another database?
>

Zhenning Lang

unread,
May 5, 2018, 10:39:26 AM5/5/18
to django...@googlegroups.com
Maybe the contents of table “django_migrations" in you database should also be removed. I am not quite sure about it


--
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/242350cd-a497-4b24-9a0a-728a9b0ae142%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruhia gr

unread,
May 5, 2018, 1:37:32 PM5/5/18
to django...@googlegroups.com
hello everyone m new to django and am starting my ecommerce project in djnago .please anyone suggest which is best for ecommerce project(online shopping)django or django cms

 

On Sat, May 5, 2018 at 6:19 PM, Zhenning Lang <z...@sensedeal.ai> wrote:
Maybe the contents of table “django_migrations" in you database should also be removed. I am not quite sure about it
在 2018年5月5日,下午6:34,Gerald Brown <gsbr...@gmail.com> 写道:

I have dropped my database, deleted all migrations directories and when I run ./manage.py makemigrations I get the message "No changes detected".

I am using Django 2.04 with Python 3.5.

Any ideas why this is happening?

Thanks.

--
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.

--
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.

Gerald Brown

unread,
May 5, 2018, 7:40:49 PM5/5/18
to django...@googlegroups.com

I tried that too but it kept giving an error about Key constraints. That is why I dropped the whole database and then recreated it.  Will just have to look in to it more.

Thanks for your reply.

Who knows what evil lurks in the heart and mind of the computer?  The Shadow knows...

Bernard Letourmy

unread,
May 6, 2018, 5:57:26 AM5/6/18
to Django users
Hello,
If you've got "No changes detected" on makemigrations, it means it did it job already (in previous run probably)
can you list and post the content of you migrations folders ?

then if you have errors on makemigrations it would help helping you if you would  post the actual error logs.
Those errors can be related to something else, like an issue with you configuration or  python environment.
Any conf. changes / pip install before you start having issues with you migrations ?

Also what was the reason for you to recreate your migrations files ?
How did you do before that / were your migrations ok ?

/Bernard
Reply all
Reply to author
Forward
0 new messages