I need to make annotation for column in my entity - "on update CURRENT_TIMESTAMP" attribute. How can I do that?
You cannot use your own column definition:
/**
* @ORM\Column(type="datetime", columnDefinition="DATETIME on update CURRENT_TIMESTAMP")
*/
private $updatedAt;
The example is for MySQL. Take into account, that columnDefinition
is not portable among different databases or even their versions.
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