似乎在Doctrine的Symfony 1.4中,当生成自动增量列(id)时,它缺省为bigint。这看起来有点夸大其词,我只想将其默认为一个整数。
下面生成一个名为id的主键列,该列是一个bigint
JobeetCategory:
actAs: { Timestampable: ~ }
columns:
name: { type: string(255), notnull: true, unique: true }有没有配置文件我可以在其中更改。我不想手动将id列作为整数添加。
发布于 2010-02-18 05:32:29
据我所知没有。
如果最终手动将id列添加到模式中,则可以将它们的类型指定为integer(4)以创建MySQL int字段:http://www.symfony-project.org/doctrine/1_2/en/04-Schema-Files#chapter_04_data_types。
https://stackoverflow.com/questions/2278723
复制相似问题