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
20774165
Commit
20774165
authored
Aug 11, 2014
by
mcd.php
Committed by
Alexander Makarov
Aug 12, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes #4644: Added `\yii\db\Schema::createColumnSchema()` to be able to…
Fixes #4644: Added `\yii\db\Schema::createColumnSchema()` to be able to customize column schema used
parent
a4e4c1e0
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
14 additions
and
6 deletions
+14
-6
CHANGELOG.md
framework/CHANGELOG.md
+1
-0
Schema.php
framework/db/Schema.php
+7
-0
Schema.php
framework/db/cubrid/Schema.php
+1
-1
Schema.php
framework/db/mssql/Schema.php
+1
-1
Schema.php
framework/db/mysql/Schema.php
+1
-1
Schema.php
framework/db/oci/Schema.php
+1
-1
Schema.php
framework/db/pgsql/Schema.php
+1
-1
Schema.php
framework/db/sqlite/Schema.php
+1
-1
No files found.
framework/CHANGELOG.md
View file @
20774165
...
@@ -173,6 +173,7 @@ Yii Framework 2 Change Log
...
@@ -173,6 +173,7 @@ Yii Framework 2 Change Log
-
Enh #4566: Added client validation support for image validator (Skysplit, qiangxue)
-
Enh #4566: Added client validation support for image validator (Skysplit, qiangxue)
-
Enh #4581: Added ability to disable url encoding in
`UrlRule`
(tadaszelvys)
-
Enh #4581: Added ability to disable url encoding in
`UrlRule`
(tadaszelvys)
-
Enh #4602: Added $key param in ActionColumn buttons Closure call (disem)
-
Enh #4602: Added $key param in ActionColumn buttons Closure call (disem)
-
Enh #4644: Added
`\yii\db\Schema::createColumnSchema()`
to be able to customize column schema used (mcd-php)
-
Enh: Added support for using sub-queries when building a DB query with
`IN`
condition (qiangxue)
-
Enh: Added support for using sub-queries when building a DB query with
`IN`
condition (qiangxue)
-
Enh: Supported adding a new response formatter without the need to reconfigure existing formatters (qiangxue)
-
Enh: Supported adding a new response formatter without the need to reconfigure existing formatters (qiangxue)
-
Enh: Added
`yii\web\UrlManager::addRules()`
to simplify adding new URL rules (qiangxue)
-
Enh: Added
`yii\web\UrlManager::addRules()`
to simplify adding new URL rules (qiangxue)
...
...
framework/db/Schema.php
View file @
20774165
...
@@ -84,6 +84,13 @@ abstract class Schema extends Object
...
@@ -84,6 +84,13 @@ abstract class Schema extends Object
*/
*/
private
$_builder
;
private
$_builder
;
/**
* @return \yii\db\ColumnSchema
* @throws \yii\base\InvalidConfigException
*/
protected
function
createColumnSchema
()
{
return
Yii
::
createObject
(
'yii\db\ColumnSchema'
);
}
/**
/**
* Loads the metadata for the specified table.
* Loads the metadata for the specified table.
...
...
framework/db/cubrid/Schema.php
View file @
20774165
...
@@ -195,7 +195,7 @@ class Schema extends \yii\db\Schema
...
@@ -195,7 +195,7 @@ class Schema extends \yii\db\Schema
*/
*/
protected
function
loadColumnSchema
(
$info
)
protected
function
loadColumnSchema
(
$info
)
{
{
$column
=
new
ColumnSchema
();
$column
=
$this
->
create
ColumnSchema
();
$column
->
name
=
$info
[
'Field'
];
$column
->
name
=
$info
[
'Field'
];
$column
->
allowNull
=
$info
[
'Null'
]
===
'YES'
;
$column
->
allowNull
=
$info
[
'Null'
]
===
'YES'
;
...
...
framework/db/mssql/Schema.php
View file @
20774165
...
@@ -176,7 +176,7 @@ class Schema extends \yii\db\Schema
...
@@ -176,7 +176,7 @@ class Schema extends \yii\db\Schema
*/
*/
protected
function
loadColumnSchema
(
$info
)
protected
function
loadColumnSchema
(
$info
)
{
{
$column
=
new
ColumnSchema
();
$column
=
$this
->
create
ColumnSchema
();
$column
->
name
=
$info
[
'column_name'
];
$column
->
name
=
$info
[
'column_name'
];
$column
->
allowNull
=
$info
[
'is_nullable'
]
==
'YES'
;
$column
->
allowNull
=
$info
[
'is_nullable'
]
==
'YES'
;
...
...
framework/db/mysql/Schema.php
View file @
20774165
...
@@ -127,7 +127,7 @@ class Schema extends \yii\db\Schema
...
@@ -127,7 +127,7 @@ class Schema extends \yii\db\Schema
*/
*/
protected
function
loadColumnSchema
(
$info
)
protected
function
loadColumnSchema
(
$info
)
{
{
$column
=
new
ColumnSchema
;
$column
=
$this
->
createColumnSchema
()
;
$column
->
name
=
$info
[
'Field'
];
$column
->
name
=
$info
[
'Field'
];
$column
->
allowNull
=
$info
[
'Null'
]
===
'YES'
;
$column
->
allowNull
=
$info
[
'Null'
]
===
'YES'
;
...
...
framework/db/oci/Schema.php
View file @
20774165
...
@@ -200,7 +200,7 @@ EOD;
...
@@ -200,7 +200,7 @@ EOD;
*/
*/
protected
function
createColumn
(
$column
)
protected
function
createColumn
(
$column
)
{
{
$c
=
new
ColumnSchema
();
$c
=
$this
->
create
ColumnSchema
();
$c
->
name
=
$column
[
'COLUMN_NAME'
];
$c
->
name
=
$column
[
'COLUMN_NAME'
];
$c
->
allowNull
=
$column
[
'NULLABLE'
]
===
'Y'
;
$c
->
allowNull
=
$column
[
'NULLABLE'
]
===
'Y'
;
$c
->
isPrimaryKey
=
strpos
(
$column
[
'KEY'
],
'P'
)
!==
false
;
$c
->
isPrimaryKey
=
strpos
(
$column
[
'KEY'
],
'P'
)
!==
false
;
...
...
framework/db/pgsql/Schema.php
View file @
20774165
...
@@ -434,7 +434,7 @@ SQL;
...
@@ -434,7 +434,7 @@ SQL;
*/
*/
protected
function
loadColumnSchema
(
$info
)
protected
function
loadColumnSchema
(
$info
)
{
{
$column
=
new
ColumnSchema
();
$column
=
$this
->
create
ColumnSchema
();
$column
->
allowNull
=
$info
[
'is_nullable'
];
$column
->
allowNull
=
$info
[
'is_nullable'
];
$column
->
autoIncrement
=
$info
[
'is_autoinc'
];
$column
->
autoIncrement
=
$info
[
'is_autoinc'
];
$column
->
comment
=
$info
[
'column_comment'
];
$column
->
comment
=
$info
[
'column_comment'
];
...
...
framework/db/sqlite/Schema.php
View file @
20774165
...
@@ -212,7 +212,7 @@ class Schema extends \yii\db\Schema
...
@@ -212,7 +212,7 @@ class Schema extends \yii\db\Schema
*/
*/
protected
function
loadColumnSchema
(
$info
)
protected
function
loadColumnSchema
(
$info
)
{
{
$column
=
new
ColumnSchema
;
$column
=
$this
->
createColumnSchema
()
;
$column
->
name
=
$info
[
'name'
];
$column
->
name
=
$info
[
'name'
];
$column
->
allowNull
=
!
$info
[
'notnull'
];
$column
->
allowNull
=
!
$info
[
'notnull'
];
$column
->
isPrimaryKey
=
$info
[
'pk'
]
!=
0
;
$column
->
isPrimaryKey
=
$info
[
'pk'
]
!=
0
;
...
...
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