It seems that in Symfony 1.4 with Doctrine that when generating auto-increment columns (id) it defaults to bigint. This seems like total overkill and I would just like to default it to an integer instead.
The following produces a primary key column named id that is a bigint
开发者_运维百科JobeetCategory:
actAs: { Timestampable: ~ }
columns:
name: { type: string(255), notnull: true, unique: true }
Is there a configuration file I can change this in. I don't want to have to manually add the id column as an integer.
Not that I'm aware of, no.
If you do end up manually adding the id columns into your schema you can specify their type as integer(4)
to create a MySQL int
field: http://www.symfony-project.org/doctrine/1_2/en/04-Schema-Files#chapter_04_data_types.
精彩评论