views:

11

answers:

1

Hello. I have the following yml configuration for Doctrine under MySQL:

Designer:
  tableName: designers
  columns:
    id:
      type: integer(2)
    name:
      type: string(30)
      notnull: true

Item:
  tableName: items
  columns:
    id:
      type: integer(3)
      unsigned: true
      primary: true
      autoincrement: true
    model_name:
      type: string(40)
      notnull: true

When I drop tables with DBMS and use Doctrine CLI to create-tables it reports their successful creation but when I check columns, but sets the id in the designers table to type SMALLINT with length 5 and in the items - MEDIUMINT(8). I'd like them to be 2 and 3, as stated in the config. What could be the reason? TIA

A: 

Smallint is 2 Bytes, MEDIUMINT is 3 Bytes. Doctrine doc says:

integer - Length is the the number of bytes the integer occupies.

Turbo J