Hello Guys,
i have try to remove defaut attribute and again try to run migrations it
didnt worked .
then i removed all migration files from app and tried running
makemigrations it succeed but when trying to migrate it , it giving me
error like wont reflect changes in migrations.
im also not ge
lue for each specific field
>
> Sent from Mail for Windows 10
>
> From: Mayur Bagul
> Sent: Sunday, 26 April 2020 18:39
> To: Django users
> Subject: Re: The database backend does not accept 0 as a value for AutoField.
>
> Hey thanks for your response i did so beca
On Sun, Apr 26, 2020 at 9:53 AM Antje Kazimiers wrote:
> how about adding null=True and blank=True to the field?
> On 4/26/20 6:38 PM, Mayur Bagul wrote:
>
> Hey thanks for your response i did so because initially at the time of
> migration it was asking for default value and i just putted false
how about adding null=True and blank=True to the field?
On 4/26/20 6:38 PM, Mayur Bagul wrote:
> Hey thanks for your response i did so because initially at the time of
> migration it was asking for default value and i just putted false in
> rush. that filed user from User model returns username as
backend does not accept 0 as a value for AutoField. Hey thanks for your response i did so because initially at the time of migration it was asking for default value and i just putted false in rush. that filed user from User model returns username as string autofield so what shall i put as default
Also, Please make sure that any foreign key fields are not default nulls Sent from Mail for Windows 10 From: Mayur BagulSent: Sunday, 26 April 2020 18:39To: Django usersSubject: Re: The database backend does not accept 0 as a value for AutoField. Hey thanks for your response i did so because
Hey thanks for your response i did so because initially at the time of
migration it was asking for default value and i just putted false in rush.
that filed user from User model returns username as string autofield so
what shall i put as default their?
i tried to put None for default value but w
Think you shouldn’t use false as a default for fields which are not bool
Sent from Mail for Windows 10
From: Antje Kazimiers
Sent: Sunday, 26 April 2020 17:40
To: django-users@googlegroups.com
Subject: Re: The database backend does not accept 0 as a value for AutoField.
setting default=False is
setting default=False is odd for any field other than a BooleanField. I
would take that out for the OneToOneField at least and see how things go.
Antje
On 4/26/20 4:19 PM, Mayur Bagul wrote:
> Hello guys,
>
> im stucked with this error mentioned in subject.
> below link redirect details about que
9 matches
Mail list logo