yes, I do

On Saturday, December 12, 2020 at 5:11:30 PM UTC+1 tbag...@gmail.com wrote:

> did you redo py manage.py makemigrations after your modification?
>
> Le sam. 12 déc. 2020 à 13:21, 712189512 <gabriels...@gmail.com> a écrit :
>
>> It’s probably because you have already made migrations and also made some 
>> changes in your model ,if that’s the case delete the old migrations and 
>> make migrations again and should work 
>>
>> On Sat, Dec 12, 2020 at 1:56 PM Taofeek Jimoh Iyanda <
>> iyandat...@gmail.com> wrote:
>>
>>> Hello Guys,
>>>
>>> Please I need an urgent help on this subject, I was trying to migrate my 
>>> model in django to a postgres DB but I am getting 'value too long for type 
>>> character varying(1)' error. I have tried making the max_length = 1000 but 
>>> I am still getting the same error. 
>>>
>>> The last thing I can remember I did was that I create another CharField 
>>> with a list of choice. I tried removing it but still getting the same error.
>>>
>>> Below is the code i am trying to migrate:
>>>
>>> from django.db import models
>>> from django.utils import timezone
>>> import datetime
>>> # Create your models here.
>>> SEX = [
>>>         ('M', 'MALE'),
>>>         ('F', 'FEMALE')
>>> ]
>>>
>>> TITLE_CHOICES = [
>>>         ('MR','Mr.'),
>>>         ('MRS','Mrs.'),
>>>         ('MS','Ms.')
>>> ]
>>>
>>> STATUS = [
>>>     ('A', 'Admitted'),
>>>     ('D', 'Discharged')
>>> ]
>>>
>>>
>>> class PatientDetail(models.Model):
>>>     
>>>     """
>>>     Model of the details of entry patient 
>>>     """
>>>     FirstName = models.CharField(blank = False, max_length = 1000)
>>>     LastName = models.CharField(blank = False, max_length = 1000)
>>>     MiddleName = models.CharField(max_length = 1000)
>>>
>>>     Title = models.CharField(choices = TITLE_CHOICES, blank=False, 
>>> max_length = 1000)
>>>     Address = models.CharField(blank = False, max_length = 1000)
>>>     Email = models.EmailField(max_length = 1000)
>>>
>>>     sex = models.CharField(blank = False, choices = SEX, max_length = 1000)
>>>     Age = models.DateField(blank = False)
>>>     PhoneNumber = models.CharField(blank = False, max_length = 1000)
>>>     NextOfKin = models.CharField(blank = False, max_length = 1000)
>>>
>>>     NextofKin_Address = models.CharField(blank = False, max_length = 1000)
>>>
>>>     NextofKIn_PhoneNumber = models.DecimalField(blank = False, 
>>> max_digits=13, decimal_places=0)
>>>     DateOfReg = models.DateTimeField(auto_now=True)
>>>     NurseInDuty = models.CharField(blank=False, max_length = 1000)
>>>
>>>     Status = models.CharField(choices = STATUS, blank = False, max_length = 
>>> 1000)
>>>     
>>>     
>>>     class Meta:
>>>         db_table = 'Patient Detail'
>>>
>>> -- 
>>> 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 view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/django-users/64780f11-2e95-45dd-a36c-5621a17f8a3cn%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/django-users/64780f11-2e95-45dd-a36c-5621a17f8a3cn%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> -- 
>> Gabrielstone😎
>>
>> -- 
>> 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 view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/CAL-5MpVB5Q6SaLtCgz522Emi9XYyvzzjNuL%3DQGUtmNX0JkeSAQ%40mail.gmail.com
>>  
>> <https://groups.google.com/d/msgid/django-users/CAL-5MpVB5Q6SaLtCgz522Emi9XYyvzzjNuL%3DQGUtmNX0JkeSAQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>
>
> -- 
> *Anselme Gildas TCHASSEM BOUTCHOUANG*
> DevOps, Fullstack, Freelance
> (+237) 696 319 191 / (+237) 698 544 992 / Email : *aanseg...@yahoo.fr* / 
> LinkedIN : Profil LinkedIN 
> <http://www.linkedin.com/in/anselme-gildas-tchassem-boutchouang-2048a916b> 
> / Facebook : Profil Facebook 
> <https://web.facebook.com/profile.php?id=100009069093492>  / Whatsapp: 
> (+237) 696 319 191 
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/592bd5bc-4d57-4caa-a6be-2f055f6f3e3fn%40googlegroups.com.

Reply via email to