mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
FIxed db/build producing bad SQL when altering indexes
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@40829 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
6600c92be0
commit
5984be1856
@ -182,7 +182,7 @@ class MySQLDatabase extends Database {
|
|||||||
$fieldSchemas = $indexSchemas = "";
|
$fieldSchemas = $indexSchemas = "";
|
||||||
|
|
||||||
if($newFields) foreach($newFields as $k => $v) $alterList[] .= "ADD `$k` $v";
|
if($newFields) foreach($newFields as $k => $v) $alterList[] .= "ADD `$k` $v";
|
||||||
if($newIndexes) foreach($newIndexes as $k => $v) $alterList[] .= "ADD " . $this->getIndexSqlDefinition($k, $v) . ",\n";
|
if($newIndexes) foreach($newIndexes as $k => $v) $alterList[] .= "ADD " . $this->getIndexSqlDefinition($k, $v);
|
||||||
if($alteredFields) foreach($alteredFields as $k => $v) $alterList[] .= "CHANGE `$k` `$k` $v";
|
if($alteredFields) foreach($alteredFields as $k => $v) $alterList[] .= "CHANGE `$k` `$k` $v";
|
||||||
if($alteredIndexes) foreach($alteredIndexes as $k => $v) {
|
if($alteredIndexes) foreach($alteredIndexes as $k => $v) {
|
||||||
$alterList[] .= "DROP INDEX `$k`";
|
$alterList[] .= "DROP INDEX `$k`";
|
||||||
|
Loading…
Reference in New Issue
Block a user