DmitryDulepov\Realurl\ext_update::checkAndUpdatePathCachePrimaryKey PHP Method

checkAndUpdatePathCachePrimaryKey() protected method

Checks if the primary key needs updates (this is something that TYPO3 sql parser fails to do for years) and does necessary changes.
    protected function checkAndUpdatePathCachePrimaryKey()
    {
        if ($this->pathCacheNeedsUpdates()) {
            $this->databaseConnection->sql_query('ALTER TABLE tx_realurl_pathdata CHANGE cache_id uid int(11) NOT NULL');
            $this->databaseConnection->sql_query('ALTER TABLE tx_realurl_pathdata DROP PRIMARY KEY');
            $this->databaseConnection->sql_query('ALTER TABLE tx_realurl_pathdata MODIFY uid int(11) NOT NULL auto_increment PRIMARY KEY');
        }
    }