mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00: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.
|
* database expects.
|
||||||
* @return array
|
* @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();
|
protected abstract function tableList();
|
||||||
|
|
||||||
|
|
||||||
|
@ -358,18 +358,6 @@ class MySQLDatabase extends SS_Database {
|
|||||||
return $fieldList;
|
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.
|
* Create an index on a table.
|
||||||
*
|
*
|
||||||
|
@ -32,8 +32,7 @@ class DatabaseTest extends SapphireTest {
|
|||||||
function testRenameField() {
|
function testRenameField() {
|
||||||
$conn = DB::getConn();
|
$conn = DB::getConn();
|
||||||
|
|
||||||
//Reset our cached fieldlists:
|
$conn->clearCachedFieldlist();
|
||||||
$conn->clear_cached_fieldlist();
|
|
||||||
|
|
||||||
$conn->renameField('DatabaseTest_MyObject', 'MyField', 'MyRenamedField');
|
$conn->renameField('DatabaseTest_MyObject', 'MyField', 'MyRenamedField');
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user