I tried using the addTimestamps() function today and what happened seemed to me to be incorrect behavior. When doing a DESC on my mysql table I got back the following:
+--------------+--------------+------+-----+-------------------+-----------------------------+
| Field | Type | Null | Key | Default | Extra |
+--------------+--------------+------+-----+-------------------+-----------------------------+
| created_at | timestamp | NO | | CURRENT_TIMESTAMP | on update CURRENT_TIMESTAMP |
| updated_at | timestamp | YES | | NULL | |
+--------------+--------------+------+-----+-------------------+-----------------------------+
I would expect the Extra field of 'on update CURRENT_TIMESTAMP' to be attached to the updated_at field not the created_at field. I don't know that this is incorrect behavior, but it is not what I would have expected to occur, so, I figured I would at least point it out. If you could please let me know if this is the intended behavior which Phinx wants or if this is an actual issue.
Thanks.
I tried using the addTimestamps() function today and what happened seemed to me to be incorrect behavior. When doing a DESC on my mysql table I got back the following:
I would expect the Extra field of 'on update CURRENT_TIMESTAMP' to be attached to the
updated_atfield not thecreated_atfield. I don't know that this is incorrect behavior, but it is not what I would have expected to occur, so, I figured I would at least point it out. If you could please let me know if this is the intended behavior which Phinx wants or if this is an actual issue.Thanks.