Add ability to use \yii\db\Expression
for SchemaBuilder::defaultValue()
.
Particularly this need for assign default value to TIMESTAMP column:
$this->timestamp()->defaultValue(new \yii\db\Expression('CURRENT_TIMESTAMP'))
Perhaps we should introduce another method defaultExpression()
for expressions to simplify syntax:
$this->timestamp()->defaultExpression('CURRENT_TIMESTAMP')
:+1:
+1
+1
Most helpful comment
Perhaps we should introduce another method
defaultExpression()
for expressions to simplify syntax: