I’m looking for a way to make doctrine using TIMESTAMP instead of DATETIME for MySql.
Additionaly I need to set ON UPDATE CURRENT_TIMESTAMP and CURRENT_TIMESTAMP as default values.
I would like to have the possibility to have all this code in PHP annotations to have everything in one central place.
How can I do that?
There is no such thing like using
TIMESTAMPin mysql with Doctrine.However, I fixed it myself but have to test it:
Doctrine\DBAL\Types\TimestampType.phpTimeType.phpintoTimestampType.phpDoctrine\DBAL\Types\Type.phpgetTimestampTypeDeclarationSQLinDoctrine\DBAL\Platforms\AbstractPlatform.phpTIMESTAMPI’ve used
yamlto create my Entities and Proxies, so use inyaml:I’m going to test this ‘fix’/’workaround’ now. I’ll let you know.