I’m using Doctrine 2 for my DB and I’m currently trying to set a length for one of my column that has an “integer” type but it just doesn’t seem to be taken.
/** @Column(type="integer", length=255) */
protected $number;
When I check my database it still says “int(11)” instead of “int(255)”. I haven’t found anyone experiencing that problem on google or maybe my keywords ain’t working so good. I’ve seen a few example of people using length=XXX and not complaining about it so I thought it would be the way to go but so far no good…
I’m always dropping/rebuilding the whole DB and proxies etc so I doubt it comes from there.
It is because you cannot have such a big
INTin MySQL.Try using the type
BIGINTinstead, it goes from -9223372036854775808 to 9223372036854775807 (signed) or from 0 to 18446744073709551615 (unsigned).Doctrine version:
Manual