mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX Renamed MySQLDatabase->clear_cached_fieldlist() to clearCachedFieldList() and moved to parent Database class in order to avoid breaking other database drivers (broken in 360176d2
by gmunn)
This commit is contained in:
parent
d0afa9987c
commit
0a4aa9dc17
@ -115,6 +115,19 @@ abstract class SS_Database {
|
||||
* database expects.
|
||||
* @return array
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* This is a stub function. Postgres caches the fieldlist results.
|
||||
*
|
||||
* @param string $tableName
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
function clearCachedFieldlist($tableName=false){
|
||||
return true;
|
||||
}
|
||||
|
||||
protected abstract function tableList();
|
||||
|
||||
|
||||
|
@ -358,18 +358,6 @@ class MySQLDatabase extends SS_Database {
|
||||
return $fieldList;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* This is a stub function. Postgres caches the fieldlist results.
|
||||
*
|
||||
* @param string $tableName
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
function clear_cached_fieldlist($tableName=false){
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an index on a table.
|
||||
*
|
||||
|
@ -32,8 +32,7 @@ class DatabaseTest extends SapphireTest {
|
||||
function testRenameField() {
|
||||
$conn = DB::getConn();
|
||||
|
||||
//Reset our cached fieldlists:
|
||||
$conn->clear_cached_fieldlist();
|
||||
$conn->clearCachedFieldlist();
|
||||
|
||||
$conn->renameField('DatabaseTest_MyObject', 'MyField', 'MyRenamedField');
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user