src/ORM/Connect/DBSchemaManager.php
public function fixTableCase($tableName)
    {
        // Check if table exists
        $tables = $this->tableList();
        if (!array_key_exists(strtolower($tableName), $tables)) {
            return;
        }

        // Check if case differs
        $currentName = $tables[strtolower($tableName)];
        if ($currentName === $tableName) {
            return;
        }

        $this->alterationMessage(
            "Table $tableName: renamed from $currentName",
            "repaired"
        );

        // Rename via temp table to avoid case-sensitivity issues
        $tempTable = "__TEMP__{$tableName}";
        $this->renameTable($currentName, $tempTable);
        $this->renameTable($tempTable, $tableName);
    }
public function fixTableCase($tableName)
    {
        // Check if table exists
        $tables = $this->tableList();
        if (!array_key_exists(strtolower($tableName), $tables)) {
            return;
        }

        // Check if case differs
        $currentName = $tables[strtolower($tableName)];
        if ($currentName === $tableName) {
            return;
        }

        $this->alterationMessage(
            "Table $tableName: renamed from $currentName",
            "repaired"
        );

        // Rename via temp table to avoid case-sensitivity issues
        $tempTable = "__TEMP__{$tableName}";
        $this->renameTable($currentName, $tempTable);
        $this->renameTable($tempTable, $tableName);
    }
public function fixTableCase ( $ tableName ) { // Check if table exists $ tables = $ this -> tableList ( ) ; if ( ! array_key_exists ( strtolower ( $ tableName ) , $ tables ) ) { return ; } // Check if case differs $ currentName = $ tables [ strtolower ( $ tableName ) ] ; if ( $ currentName === $ tableName ) { return ; } $ this -> alterationMessage ( "Table $tableName: renamed from $currentName" , "repaired" ) ; // Rename via temp table to avoid case-sensitivity issues $ tempTable = "__TEMP__{$tableName}" ; $ this -> renameTable ( $ currentName , $ tempTable ) ; $ this -> renameTable ( $ tempTable , $ tableName ) ; }
Ensure the given table has the correct case

@param string $tableName Name of table in desired case
Ensure the given table has the correct case