BooleanField ignored by makemigrations Django 2.0

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

BooleanField ignored by makemigrations Django 2.0

Gary Mumford
Hi,
I have just installed Django 2.0 and Python 3.6.3. I am not a noobie, but it has been a while since I djangoed.

I have several fields in a model.py which are BooleanField type.

When running makemigrations.py, these fields are being ignored and not being generated into the migrations code or the migrations db. 

Also, any changes are not being tracked and so my migrations are getting hopelessly screwed.

To see if anything made sense - I ran an inspectdb on an existing mySQL db and found that even though this utility recognised the tinyInt being on the db - even after changing the field type to BooleanField - no changes were detected during makemigrations.

Has anyone seen this before and know how to work around it please?

--
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 [hidden email].
To post to this group, send email to [hidden email].
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/78058a26-cde9-46a3-ba2e-78aae75fe95b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: BooleanField ignored by makemigrations Django 2.0

Andy-3
Your app is most likely not listed in installed_apps when makemigrations is not picking up anything.
Or its just because you named it model.py instead of models.py?
Is any other model of that app picked up by makemigrations?


Am Donnerstag, 8. Februar 2018 23:28:19 UTC+1 schrieb Gary Mumford:
Hi,
I have just installed Django 2.0 and Python 3.6.3. I am not a noobie, but it has been a while since I djangoed.

I have several fields in a model.py which are BooleanField type.

When running makemigrations.py, these fields are being ignored and not being generated into the migrations code or the migrations db. 

Also, any changes are not being tracked and so my migrations are getting hopelessly screwed.

To see if anything made sense - I ran an inspectdb on an existing mySQL db and found that even though this utility recognised the tinyInt being on the db - even after changing the field type to BooleanField - no changes were detected during makemigrations.

Has anyone seen this before and know how to work around it please?

--
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 [hidden email].
To post to this group, send email to [hidden email].
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/32c8de4c-e5c2-4979-9266-273e2d27cfa7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.