Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
Tomáš Trávníček
doctrine-dbal
Commits
fd976290
Commit
fd976290
authored
Sep 18, 2010
by
Juozas Kaziukenas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed autoincrement field detection
parent
d4aab703
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
MsSqlSchemaManager.php
lib/Doctrine/DBAL/Schema/MsSqlSchemaManager.php
+5
-7
No files found.
lib/Doctrine/DBAL/Schema/MsSqlSchemaManager.php
View file @
fd976290
...
@@ -40,8 +40,10 @@ class MsSqlSchemaManager extends AbstractSchemaManager
...
@@ -40,8 +40,10 @@ class MsSqlSchemaManager extends AbstractSchemaManager
{
{
$dbType
=
strtolower
(
$tableColumn
[
'TYPE_NAME'
]);
$dbType
=
strtolower
(
$tableColumn
[
'TYPE_NAME'
]);
$autoincrement
=
false
;
if
(
stripos
(
$dbType
,
'identity'
))
{
if
(
stripos
(
$dbType
,
'identity'
))
{
$dbType
=
trim
(
str_ireplace
(
'identity'
,
''
,
$dbType
));
$dbType
=
trim
(
str_ireplace
(
'identity'
,
''
,
$dbType
));
$autoincrement
=
true
;
}
}
$type
=
array
();
$type
=
array
();
...
@@ -160,12 +162,8 @@ class MsSqlSchemaManager extends AbstractSchemaManager
...
@@ -160,12 +162,8 @@ class MsSqlSchemaManager extends AbstractSchemaManager
'notnull'
=>
(
bool
)
(
$tableColumn
[
'IS_NULLABLE'
]
!=
'YES'
),
'notnull'
=>
(
bool
)
(
$tableColumn
[
'IS_NULLABLE'
]
!=
'YES'
),
'scale'
=>
$tableColumn
[
'SCALE'
],
'scale'
=>
$tableColumn
[
'SCALE'
],
'precision'
=>
$tableColumn
[
'PRECISION'
],
'precision'
=>
$tableColumn
[
'PRECISION'
],
'platformOptions'
=>
array
(
'unique'
=>
false
,
// @todo
// @todo
'autoincrement'
=>
$autoincrement
,
'primary'
=>
false
,
'unique'
=>
false
,
'autoincrement'
=>
false
,
),
);
);
return
new
Column
(
$tableColumn
[
'COLUMN_NAME'
],
\Doctrine\DBAL\Types\Type
::
getType
(
$type
),
$options
);
return
new
Column
(
$tableColumn
[
'COLUMN_NAME'
],
\Doctrine\DBAL\Types\Type
::
getType
(
$type
),
$options
);
...
...
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