Fix #17771: migrate/fresh was not returning exit code

This commit is contained in:
Alexander Makarov
2020-01-09 15:31:54 +03:00
committed by GitHub
parent 0ba67fac0c
commit 67ff6f814b
2 changed files with 6 additions and 3 deletions

View File

@ -7,8 +7,10 @@ Yii Framework 2 Change Log
- Bug #17744: Fix a bug with setting incorrect `defaultValue` to AR column with `CURRENT_TIMESTAMP(x)` as default expression (MySQL >= 5.6.4) (bizley) - Bug #17744: Fix a bug with setting incorrect `defaultValue` to AR column with `CURRENT_TIMESTAMP(x)` as default expression (MySQL >= 5.6.4) (bizley)
- Bug #17749: Dispatcher fix if target crashed in PHP 7.0+ (kamarton) - Bug #17749: Dispatcher fix if target crashed in PHP 7.0+ (kamarton)
- Bug #17762: PHP 7.4: Remove special condition for converting PHP errors to exceptions if they occurred inside of `__toString()` call (rob006) - Bug #17762: PHP 7.4: Remove special condition for converting PHP errors to exceptions if they occurred inside of `__toString()` call (rob006)
- Bug #17771: migrate/fresh was not returning exit code (samdark)
- Bug #17767: Make `Formatter::formatNumber` method protected (TheCodeholic) - Bug #17767: Make `Formatter::formatNumber` method protected (TheCodeholic)
2.0.31 December 18, 2019 2.0.31 December 18, 2019
------------------------ ------------------------

View File

@ -464,10 +464,11 @@ abstract class BaseMigrateController extends Controller
if ($this->confirm( if ($this->confirm(
"Are you sure you want to reset the database and start the migration from the beginning?\nAll data will be lost irreversibly!")) { "Are you sure you want to reset the database and start the migration from the beginning?\nAll data will be lost irreversibly!")) {
$this->truncateDatabase(); $this->truncateDatabase();
$this->actionUp(); return $this->actionUp();
} else {
$this->stdout('Action was cancelled by user. Nothing has been performed.');
} }
$this->stdout('Action was cancelled by user. Nothing has been performed.');
return ExitCode::OK;
} }
/** /**