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
894493b2
Commit
894493b2
authored
Dec 20, 2013
by
Benjamin Eberlei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[DBAL-586] Fix failures introduced by PR and adjust code.
parent
075c68b7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
11 deletions
+2
-11
MySqlPlatform.php
lib/Doctrine/DBAL/Platforms/MySqlPlatform.php
+0
-9
MySqlPlatformTest.php
tests/Doctrine/Tests/DBAL/Platforms/MySqlPlatformTest.php
+2
-2
No files found.
lib/Doctrine/DBAL/Platforms/MySqlPlatform.php
View file @
894493b2
...
...
@@ -642,15 +642,6 @@ class MySqlPlatform extends AbstractPlatform
}
}
}
foreach
(
$diff
->
changedIndexes
as
$changedKey
=>
$changedIndex
)
{
if
(
$changedIndex
->
isPrimary
()
&&
$changedKey
!=
'PRIMARY'
)
{
$index
=
$diff
->
changedIndexes
[
$changedKey
];
$index
=
new
Index
(
$changedKey
,
$index
->
getColumns
(),
$index
->
isUnique
(),
false
);
$diff
->
removedIndexes
[
$changedKey
]
=
$index
;
$diff
->
addedIndexes
[
'PRIMARY'
]
=
$diff
->
changedIndexes
[
$changedKey
];
unset
(
$diff
->
changedIndexes
[
$changedKey
]);
}
}
$sql
=
array_merge
(
$sql
,
parent
::
getPreAlterTableIndexForeignKeySQL
(
$diff
));
...
...
tests/Doctrine/Tests/DBAL/Platforms/MySqlPlatformTest.php
View file @
894493b2
...
...
@@ -314,7 +314,7 @@ class MySqlPlatformTest extends AbstractPlatformTestCase
$diffTable
->
setPrimaryKey
(
array
(
'id'
));
$this
->
assertEquals
(
array
(
'
ALTER TABLE alter_table_add_pk DROP INDEX idx_id,
ADD PRIMARY KEY (id)'
),
array
(
'
DROP INDEX idx_id ON alter_table_add_pk'
,
'ALTER TABLE alter_table_add_pk
ADD PRIMARY KEY (id)'
),
$this
->
_platform
->
getAlterTableSQL
(
$comparator
->
diffTable
(
$table
,
$diffTable
))
);
}
...
...
@@ -375,7 +375,7 @@ class MySqlPlatformTest extends AbstractPlatformTestCase
$sql
=
$this
->
_platform
->
getAlterTableSQL
(
$diff
);
$this
->
assertEquals
(
array
(
"DROP INDEX foo_index ON mytable
"
,
"ALTER TABLE mytable DROP PRIMARY KEY
"
,
"ALTER TABLE mytable ADD PRIMARY KEY (foo)"
,
),
$sql
);
}
...
...
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