china
2018-11-12 16:39:13 UTC
Hi Experts,
I am trying to change the charfield to ForeignKey and I am running my code
I am getting the following error if do python manage.py migrate
django.db.utils.DataError: invalid input syntax for integer: "Jeff"
Here is my code
BEFORE
------
reports_to = models.CharField(max_length=128, blank=True, null=True)
in_country_manager = models.CharField(max_length=128, blank=True, null=True)
After
------
reports_to = models.ForeignKey("self", null=True, blank=True, related_name=
"employee_reports_to")
Could any please help with this issue.
Thanks,
Karthik
I am trying to change the charfield to ForeignKey and I am running my code
I am getting the following error if do python manage.py migrate
django.db.utils.DataError: invalid input syntax for integer: "Jeff"
Here is my code
BEFORE
------
reports_to = models.CharField(max_length=128, blank=True, null=True)
in_country_manager = models.CharField(max_length=128, blank=True, null=True)
After
------
reports_to = models.ForeignKey("self", null=True, blank=True, related_name=
"employee_reports_to")
Could any please help with this issue.
Thanks,
Karthik
--
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/20ca05ad-6486-489c-91fc-62adf615dee3%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+***@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/20ca05ad-6486-489c-91fc-62adf615dee3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.