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
9e7c1dc2
Commit
9e7c1dc2
authored
Dec 19, 2017
by
Gabriel Caruso
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Combine consecutives unsets
parent
0a7eadb9
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
17 deletions
+18
-17
MasterSlaveConnection.php
lib/Doctrine/DBAL/Connections/MasterSlaveConnection.php
+1
-2
DB2Platform.php
lib/Doctrine/DBAL/Platforms/DB2Platform.php
+1
-2
MySqlPlatform.php
lib/Doctrine/DBAL/Platforms/MySqlPlatform.php
+1
-2
SqlitePlatform.php
lib/Doctrine/DBAL/Platforms/SqlitePlatform.php
+5
-3
Comparator.php
lib/Doctrine/DBAL/Schema/Comparator.php
+10
-8
No files found.
lib/Doctrine/DBAL/Connections/MasterSlaveConnection.php
View file @
9e7c1dc2
...
...
@@ -288,8 +288,7 @@ class MasterSlaveConnection extends Connection
*/
public
function
close
()
{
unset
(
$this
->
connections
[
'master'
]);
unset
(
$this
->
connections
[
'slave'
]);
unset
(
$this
->
connections
[
'master'
],
$this
->
connections
[
'slave'
]);
parent
::
close
();
...
...
lib/Doctrine/DBAL/Platforms/DB2Platform.php
View file @
9e7c1dc2
...
...
@@ -698,8 +698,7 @@ class DB2Platform extends AbstractPlatform
$sql
[]
=
$this
->
getCreateIndexSQL
(
$addIndex
,
$table
);
unset
(
$diff
->
removedIndexes
[
$remKey
]);
unset
(
$diff
->
addedIndexes
[
$addKey
]);
unset
(
$diff
->
removedIndexes
[
$remKey
],
$diff
->
addedIndexes
[
$addKey
]);
break
;
}
...
...
lib/Doctrine/DBAL/Platforms/MySqlPlatform.php
View file @
9e7c1dc2
...
...
@@ -660,8 +660,7 @@ class MySqlPlatform extends AbstractPlatform
$sql
[]
=
$query
;
unset
(
$diff
->
removedIndexes
[
$remKey
]);
unset
(
$diff
->
addedIndexes
[
$addKey
]);
unset
(
$diff
->
removedIndexes
[
$remKey
],
$diff
->
addedIndexes
[
$addKey
]);
break
;
}
...
...
lib/Doctrine/DBAL/Platforms/SqlitePlatform.php
View file @
9e7c1dc2
...
...
@@ -818,9 +818,11 @@ class SqlitePlatform extends AbstractPlatform
$columnName
=
strtolower
(
$columnName
);
if
(
isset
(
$columns
[
$columnName
]))
{
unset
(
$columns
[
$columnName
]);
unset
(
$oldColumnNames
[
$columnName
]);
unset
(
$newColumnNames
[
$columnName
]);
unset
(
$columns
[
$columnName
],
$oldColumnNames
[
$columnName
],
$newColumnNames
[
$columnName
]
);
}
}
...
...
lib/Doctrine/DBAL/Schema/Comparator.php
View file @
9e7c1dc2
...
...
@@ -279,14 +279,12 @@ class Comparator
foreach
(
$fromFkeys
as
$key1
=>
$constraint1
)
{
foreach
(
$toFkeys
as
$key2
=>
$constraint2
)
{
if
(
$this
->
diffForeignKey
(
$constraint1
,
$constraint2
)
===
false
)
{
unset
(
$fromFkeys
[
$key1
]);
unset
(
$toFkeys
[
$key2
]);
unset
(
$fromFkeys
[
$key1
],
$toFkeys
[
$key2
]);
}
else
{
if
(
strtolower
(
$constraint1
->
getName
())
==
strtolower
(
$constraint2
->
getName
()))
{
$tableDifferences
->
changedForeignKeys
[]
=
$constraint2
;
$changes
++
;
unset
(
$fromFkeys
[
$key1
]);
unset
(
$toFkeys
[
$key2
]);
unset
(
$fromFkeys
[
$key1
],
$toFkeys
[
$key2
]);
}
}
}
...
...
@@ -332,8 +330,10 @@ class Comparator
if
(
!
isset
(
$tableDifferences
->
renamedColumns
[
$removedColumnName
]))
{
$tableDifferences
->
renamedColumns
[
$removedColumnName
]
=
$addedColumn
;
unset
(
$tableDifferences
->
addedColumns
[
$addedColumnName
]);
unset
(
$tableDifferences
->
removedColumns
[
$removedColumnName
]);
unset
(
$tableDifferences
->
addedColumns
[
$addedColumnName
],
$tableDifferences
->
removedColumns
[
$removedColumnName
]
);
}
}
}
...
...
@@ -373,8 +373,10 @@ class Comparator
if
(
!
isset
(
$tableDifferences
->
renamedIndexes
[
$removedIndexName
]))
{
$tableDifferences
->
renamedIndexes
[
$removedIndexName
]
=
$addedIndex
;
unset
(
$tableDifferences
->
addedIndexes
[
$addedIndexName
]);
unset
(
$tableDifferences
->
removedIndexes
[
$removedIndexName
]);
unset
(
$tableDifferences
->
addedIndexes
[
$addedIndexName
],
$tableDifferences
->
removedIndexes
[
$removedIndexName
]
);
}
}
}
...
...
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