views:

308

answers:

1

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.

+1  A: 

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.

Cryo
Thanks for the response. Unless I'm Facebook I think the 4 billion + rows of and unsigned Integer type are just fine for most applications.
Failpunk