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
d67416ab
Commit
d67416ab
authored
May 23, 2013
by
resurtm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MSSQL: select what is really needed from information_schema.columns, not just…
MSSQL: select what is really needed from information_schema.columns, not just everything as it was before.
parent
8e1079cd
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
Schema.php
framework/yii/db/mssql/Schema.php
+2
-2
No files found.
framework/yii/db/mssql/Schema.php
View file @
d67416ab
...
@@ -163,7 +163,7 @@ class Schema extends \yii\db\Schema
...
@@ -163,7 +163,7 @@ class Schema extends \yii\db\Schema
$column
->
isPrimaryKey
=
null
;
// primary key will be determined in findColumns() method
$column
->
isPrimaryKey
=
null
;
// primary key will be determined in findColumns() method
$column
->
autoIncrement
=
$info
[
'IsIdentity'
]
==
1
;
$column
->
autoIncrement
=
$info
[
'IsIdentity'
]
==
1
;
$column
->
unsigned
=
stripos
(
$column
->
dbType
,
'unsigned'
)
!==
false
;
$column
->
unsigned
=
stripos
(
$column
->
dbType
,
'unsigned'
)
!==
false
;
$column
->
comment
=
$info
[
'Comment'
]
===
null
?
''
:
$
column
[
'Comment'
];
$column
->
comment
=
$info
[
'Comment'
]
===
null
?
''
:
$
info
[
'Comment'
];
$column
->
type
=
self
::
TYPE_STRING
;
$column
->
type
=
self
::
TYPE_STRING
;
if
(
preg_match
(
'/^(\w+)(?:\(([^\)]+)\))?/'
,
$column
->
dbType
,
$matches
))
{
if
(
preg_match
(
'/^(\w+)(?:\(([^\)]+)\))?/'
,
$column
->
dbType
,
$matches
))
{
...
@@ -221,7 +221,7 @@ class Schema extends \yii\db\Schema
...
@@ -221,7 +221,7 @@ class Schema extends \yii\db\Schema
$sql
=
<<<SQL
$sql
=
<<<SQL
SELECT
SELECT
[t1].
*
,
[t1].
[COLUMN_NAME], [t1].[IS_NULLABLE], [t1].[DATA_TYPE], [t1].[COLUMN_DEFAULT]
,
COLUMNPROPERTY(OBJECT_ID([t1].[table_schema] + '.' + [t1].[table_name]), [t1].[column_name], 'IsIdentity') AS IsIdentity,
COLUMNPROPERTY(OBJECT_ID([t1].[table_schema] + '.' + [t1].[table_name]), [t1].[column_name], 'IsIdentity') AS IsIdentity,
CONVERT(VARCHAR, [t2].[value]) AS Comment
CONVERT(VARCHAR, [t2].[value]) AS Comment
FROM {$columnsTableName} AS [t1]
FROM {$columnsTableName} AS [t1]
...
...
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