Forum Discussion

Torch1655's avatar
Torch1655
Copper Contributor
Feb 28, 2022

Not incrementing the primary key

Hello, everyone. I am using MS SQL server with django framework. I inspect the DB and got the models files. I have made a primary key and it is an auto-increment field. When I try to post data it throw error you cannot insert null in uniqid.
eg: 

uniqid = models.BigAutoField(primary_key=True, null=False)

I attached the DB table.
Is anyone know how to do it. Thanks

 

No RepliesBe the first to reply

Resources