Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
7c5938f9
Commit
7c5938f9
authored
Nov 27, 2014
by
Alexander Makarov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#4791: Added more colors to `yii migrate` command
parent
338b3342
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
3 deletions
+5
-3
CHANGELOG.md
framework/CHANGELOG.md
+1
-0
BaseMigrateController.php
framework/console/controllers/BaseMigrateController.php
+0
-0
MigrateController.php
framework/console/controllers/MigrateController.php
+4
-3
No files found.
framework/CHANGELOG.md
View file @
7c5938f9
...
...
@@ -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)
...
...
framework/console/controllers/BaseMigrateController.php
View file @
7c5938f9
This diff is collapsed.
Click to expand it.
framework/console/controllers/MigrateController.php
View file @
7c5938f9
...
...
@@ -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
)
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment