In my schema I have a number of field that need to be BIGINT
. I use the following command from Symfony
symfony doctrine:build-sql
to generate my database. The fields always come out as type int
. I have tried the following types in the schema:
int
{type: integer, notnull: true}
{type: integer(5), notnull: true}
{type: bigint, notnull: true}
None of them seem to work (I always rebuild the model before building the SQL).
What type should i put in the schema.yml
?
With Symfony 2.x (e.g. Doctrine 2.4.1) and PHP annotations on Entities, using @ORM\Column(name="id", type="bigint")
results in a MySQL bigint(20)
.
NB: OP tagged this question with symfony1 & doctrine1, for which this solution will not work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With