We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

I would like to use ON UPDATE CURRENT_TIMESTAMP.

I would like to use ON UPDATE CURRENT_TIMESTAMP with mysql 's TIMESTAMP, but I can not find a way to use ON UPDATE CURRENT_TIMESTAMP in migration as long as I search for documents.

ON UPDATE CURRENT_TIMESTAMP at TIMESTAMP If you can use please let me know how to use.

edited Jul '17

Migration from developer tools? You only need to set proper table structure, and on update your (omitted) column will get updated by RDBMS engine.

So you need to define your column as:

ColumnYouWant timestamp NULL DEFAULT NULL ON UPDATE current_timestamp(),

Migration from developer tools?

Yes. I am in trouble because I can not attach ON UPDATE CURRENT_TIMESTAMP to timestamp type when doing migration by using phalcon devtools.