Setting primary key start value in Django model

前端 未结 1 1610
刺人心
刺人心 2021-01-19 21:41

I am preparing a model as follows:

class SomeModel(models.Model):
    id = models.BigIntegerField(primary_key=True, null=False, unique=True)
<
1条回答
  •  梦谈多话
    2021-01-19 22:18

    I'm not a django user but I think the postgresql command you are looking for is:

    ALTER SEQUENCE big_integer_seq RESTART 100000000;

    Best to read the documentation for django/postgresql.

    0 讨论(0)
提交回复
热议问题