Commit 7c5938f9 by Alexander Makarov

#4791: Added more colors to `yii migrate` command

parent 338b3342
......@@ -316,6 +316,7 @@ Yii Framework 2 Change Log
- Enh #4062: Added 'caseSensitive' option to `yii\helpers\BaseFileHelper::findFiles()` (klimov-paul)
- Enh #4691: Encoding on `ActiveForm` and `ActiveField` validation errors is now configurable (Alex-Code)
- Enh #4740: Added `yii\web\Session::addFlash()` (restyler)
- Enh #4791: Added more colors to `yii migrate` command (6pblcb, samdark)
- Enh #4897: Added `yii\helpers\FileHelper::mimeMagicFile` (qiangxue)
- Enh #5058: Added `$pageSize` parameter to `Pagination::createUrl()` to allow creating URLs with arbitrary page sizes (cdcchen, qiangxue)
- Enh #5089: Added asset debugger panel (arturf, qiangxue)
......
......@@ -12,6 +12,7 @@ use yii\console\Exception;
use yii\db\Connection;
use yii\db\Query;
use yii\helpers\ArrayHelper;
use yii\helpers\Console;
/**
* Manages application migrations.
......@@ -144,7 +145,7 @@ class MigrateController extends BaseMigrateController
protected function createMigrationHistoryTable()
{
$tableName = $this->db->schema->getRawTableName($this->migrationTable);
echo "Creating migration history table \"$tableName\"...";
$this->stdout("Creating migration history table \"$tableName\"...", Console::FG_YELLOW);
$this->db->createCommand()->createTable($this->migrationTable, [
'version' => 'varchar(180) NOT NULL PRIMARY KEY',
'apply_time' => 'integer',
......@@ -153,7 +154,7 @@ class MigrateController extends BaseMigrateController
'version' => self::BASE_MIGRATION,
'apply_time' => time(),
])->execute();
echo "done.\n";
$this->stdout("Done.\n", Console::FG_GREEN);
}
/**
......@@ -185,6 +186,6 @@ class MigrateController extends BaseMigrateController
protected function refreshSchema($name = 'db')
{
$this->db->schema->refresh();
echo "DB schema cache was flushed.\n";
$this->stdout("DB schema cache was flushed.\n", Console::FG_GREEN);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment