console\controllers\BaseMigrateController actionDown()

actionDown() public method

Downgrades the application by reverting old migrations.

For example,

yii migrate/down     # revert the last migration
yii migrate/down 3   # revert the last 3 migrations
yii migrate/down all # revert all migrations
public integer actionDown ( $limit = 1 )
$limit integer

The number of migrations to be reverted. Defaults to 1, meaning the last applied migration will be reverted.

return integer

The status of the action execution. 0 means normal, other values mean abnormal.

throws yii\console\Exception

if the number of the steps specified is less than 1.

doc_Yii
2016-10-30 16:54:57
Comments
Leave a Comment

Please login to continue.