...
public function safeUp()
{
$this->createTable('actor', [
'id' => $this->primaryKey(),
'mileage' => $this->bigInteger(),
'coin' => $this->bigInteger(),
'gem' => $this->bigInteger(),
'created_at' => $this->timestamp('time')->defaultExpression(' CURRENT_TIMESTAMP '),
]);
}
...
Yii Migration sql 指定时间戳默认值
最新推荐文章于 2021-12-19 11:34:50 发布