mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
API CHANGE: Database::tableList() no longer returns lowercase table names
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76355 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
0ce07eb9cd
commit
f7155ff580
@ -156,7 +156,10 @@ abstract class Database extends Object {
|
||||
* Once
|
||||
*/
|
||||
function beginSchemaUpdate() {
|
||||
$this->tableList = $this->tableList();
|
||||
$this->tableList = array();
|
||||
$tables = $this->tableList();
|
||||
foreach($tables as $table) $this->tableList[strtolower($table)] = strtolower($table);
|
||||
|
||||
$this->indexList = null;
|
||||
$this->fieldList = null;
|
||||
$this->schemaUpdateTransaction = array();
|
||||
@ -257,7 +260,6 @@ abstract class Database extends Object {
|
||||
* @param string $table The table name.
|
||||
*/
|
||||
function dontRequireTable($table) {
|
||||
if(!isset($this->tableList)) $this->tableList = $this->tableList();
|
||||
if(isset($this->tableList[strtolower($table)])) {
|
||||
$suffix = '';
|
||||
while(isset($this->tableList[strtolower("_obsolete_{$table}$suffix")])) {
|
||||
|
@ -456,13 +456,12 @@ class MySQLDatabase extends Database {
|
||||
|
||||
/**
|
||||
* Returns a list of all the tables in the database.
|
||||
* Table names will all be in lowercase.
|
||||
* @return array
|
||||
*/
|
||||
public function tableList() {
|
||||
$tables = array();
|
||||
foreach($this->query("SHOW TABLES") as $record) {
|
||||
$table = strtolower(reset($record));
|
||||
$table = reset($record);
|
||||
$tables[$table] = $table;
|
||||
}
|
||||
return $tables;
|
||||
|
Loading…
x
Reference in New Issue
Block a user