mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
MINOR Reverted regression in r112272 (from r112278)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112949 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
2699eb3b5b
commit
75101d329f
@ -321,7 +321,10 @@ class MySQLDatabase extends SS_Database {
|
||||
* @param string $newName The new name of the field
|
||||
*/
|
||||
public function renameField($tableName, $oldName, $newName) {
|
||||
$this->query("ALTER TABLE \"$tableName\" CHANGE \"$oldName\" \"$newName\" " . $fieldList[$oldName]);
|
||||
$fieldList = $this->fieldList($tableName);
|
||||
if(array_key_exists($oldName, $fieldList)) {
|
||||
$this->query("ALTER TABLE \"$tableName\" CHANGE \"$oldName\" \"$newName\" " . $fieldList[$oldName]);
|
||||
}
|
||||
}
|
||||
|
||||
private static $_cache_collation_info = array();
|
||||
|
Loading…
x
Reference in New Issue
Block a user