python - django model中的ID字段如何设置自增的初始化值呢?
PHP中文网
PHP中文网 2017-04-18 10:26:05
0
1
1086

比如从100000000开始自增,因为是订单编号,确保必须唯一,然后16位,so..

PHP中文网
PHP中文网

认证0级讲师

reply all(1)
巴扎黑

Try to do this at the database level; for example, postgresql executes ALTER SEQUENCE sequence_name RESTART WITH 12345; then test it yourself. When the test is successful, create a new migration file and throw the statement into the migration file. You should know how to customize migration, and then over

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template