How to get Django AutoFields to start at a higher number

前端 未结 7 690
挽巷
挽巷 2020-12-02 19:15

For our Django App, we\'d like to get an AutoField to start at a number other than 1. There doesn\'t seem to be an obvious way to do this. Any ideas?

7条回答
  •  遥遥无期
    2020-12-02 19:44

    The auto fields depend, to an extent, on the database driver being used.

    You'll have to look at the objects actually created for the specific database to see what's happening.

提交回复
热议问题