Browse Source

MySQL default column type for TimestampBehaviour

batch-query-test
Jitendra Joshi 9 years ago
parent
commit
8476997800
  1. 2
      framework/behaviors/TimestampBehavior.php

2
framework/behaviors/TimestampBehavior.php

@ -30,6 +30,8 @@ use yii\db\BaseActiveRecord;
* when the associated AR object is being inserted; it will fill the `updated_at` attribute
* with the timestamp when the AR object is being updated. The timestamp value is obtained by `time()`.
*
* For the above implementation to work with MySQL database, please declare the columns(`created_at`, `updated_at`) as int(11) for being UNIX timestamp.
*
* If your attribute names are different or you want to use a different way of calculating the timestamp,
* you may configure the [[createdAtAttribute]], [[updatedAtAttribute]] and [[value]] properties like the following:
*

Loading…
Cancel
Save