gpt4 book ai didi

sql - 使用 Doctrine 在 schema.yml 中设置自动递增起始值的语法是什么?

转载 作者:行者123 更新时间:2023-11-29 11:36:31 24 4
gpt4 key购买 nike

我想将列上自动递增的起始值设置为 1000000(以避免与遗留应用程序发生冲突),但找不到任何说明如何操作的文档。

非常标准的表格,相关位如下所示:

User:   
attributes:
export: tables
columns:
id:
type: integer
primary: true
autoincrement: true
code:
type: string(6)
...

最佳答案

实现此目标的最佳方法是创建 Doctrine Migration。您可以在那里将序列表的值设置为您想要的值。迁移易于使用 ( http://www.doctrine-project.org/projects/orm/1.2/docs/manual/migrations/en#migrations ),您可以在应用程序的部署过程中运行它。

关于sql - 使用 Doctrine 在 schema.yml 中设置自动递增起始值的语法是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3151278/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com