Also understand that using '0' for a primary key is NOT recommended by 
MySQL; look at:
https://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sqlmode_no_auto_value_on_zero
 

This has bitten me before when migrating data from other types of DBMS.

On Thursday, 5 January 2023 at 12:09:35 UTC+2 prashan...@gmail.com wrote:

> I'm using MySQL database in django when I am creating
>
> Id=models.AutoField(primary_key=True)
>
> It's showing below error.
>

-- 
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/0bb90f3f-e8cb-405d-969b-9b00a157862bn%40googlegroups.com.

Reply via email to