‪TYPO3CMS  10.4
TYPO3\CMS\Install\Updates\SeparateSysHistoryFromSysLogUpdate Class Reference
Inheritance diagram for TYPO3\CMS\Install\Updates\SeparateSysHistoryFromSysLogUpdate:
TYPO3\CMS\Install\Updates\UpgradeWizardInterface TYPO3\CMS\Install\Updates\RepeatableInterface

Public Member Functions

string getIdentifier ()
 
string getTitle ()
 
string getDescription ()
 
bool updateNecessary ()
 
string[] getPrerequisites ()
 
bool executeUpdate ()
 

Protected Member Functions

array moveDataFromSysLogToSysHistory (Connection $connection, Connection $connectionForSysRegistry, array $startPositionAndPhase)
 
array updateTablesAndTrackProgress (Connection $connection, Connection $connectionForSysRegistry, array $updateData, array $logData, array $row)
 
 keepHistoryForInsertAndDeleteActions (Connection $connectionForSysRegistry, array $startPositionAndPhase)
 
bool checkIfFieldInTableExists ($table, $fieldName)
 
array getStartPositionAndPhase ()
 
 unserializeToArray (string $serialized)
 

Private Attributes

const BATCH_SIZE = 100
 
const MOVE_DATA = 0
 
const UPDATE_HISTORY = 1
 

Detailed Description

Merge data stored in sys_log that belongs to sys_history

This class is only meant to be used within EXT:install and is not part of the TYPO3 Core API.

Definition at line 30 of file SeparateSysHistoryFromSysLogUpdate.php.

Member Function Documentation

◆ checkIfFieldInTableExists()

bool TYPO3\CMS\Install\Updates\SeparateSysHistoryFromSysLogUpdate::checkIfFieldInTableExists (   $table,
  $fieldName 
)
protected

Checks if given field /column in a table exists

Parameters
string$table
string$fieldName
Returns
‪bool

Definition at line 361 of file SeparateSysHistoryFromSysLogUpdate.php.

Referenced by TYPO3\CMS\Install\Updates\SeparateSysHistoryFromSysLogUpdate\updateNecessary().

◆ executeUpdate()

bool TYPO3\CMS\Install\Updates\SeparateSysHistoryFromSysLogUpdate::executeUpdate ( )

◆ getDescription()

string TYPO3\CMS\Install\Updates\SeparateSysHistoryFromSysLogUpdate::getDescription ( )
Returns
‪string Longer description of this updater

Implements TYPO3\CMS\Install\Updates\UpgradeWizardInterface.

Definition at line 61 of file SeparateSysHistoryFromSysLogUpdate.php.

◆ getIdentifier()

string TYPO3\CMS\Install\Updates\SeparateSysHistoryFromSysLogUpdate::getIdentifier ( )
Returns
‪string Unique identifier of this updater

Implements TYPO3\CMS\Install\Updates\UpgradeWizardInterface.

Definition at line 45 of file SeparateSysHistoryFromSysLogUpdate.php.

◆ getPrerequisites()

string [] TYPO3\CMS\Install\Updates\SeparateSysHistoryFromSysLogUpdate::getPrerequisites ( )
Returns
‪string[] All new fields and tables must exist

Implements TYPO3\CMS\Install\Updates\UpgradeWizardInterface.

Definition at line 95 of file SeparateSysHistoryFromSysLogUpdate.php.

◆ getStartPositionAndPhase()

array TYPO3\CMS\Install\Updates\SeparateSysHistoryFromSysLogUpdate::getStartPositionAndPhase ( )
protected

Returns an array with phase / uid combination that specifies the start position the update process should start with.

Returns
‪array New start position

Definition at line 376 of file SeparateSysHistoryFromSysLogUpdate.php.

References TYPO3\CMS\Install\Updates\SeparateSysHistoryFromSysLogUpdate\MOVE_DATA.

Referenced by TYPO3\CMS\Install\Updates\SeparateSysHistoryFromSysLogUpdate\executeUpdate().

◆ getTitle()

string TYPO3\CMS\Install\Updates\SeparateSysHistoryFromSysLogUpdate::getTitle ( )
Returns
‪string Title of this updater

Implements TYPO3\CMS\Install\Updates\UpgradeWizardInterface.

Definition at line 53 of file SeparateSysHistoryFromSysLogUpdate.php.

◆ keepHistoryForInsertAndDeleteActions()

TYPO3\CMS\Install\Updates\SeparateSysHistoryFromSysLogUpdate::keepHistoryForInsertAndDeleteActions ( Connection  $connectionForSysRegistry,
array  $startPositionAndPhase 
)
protected

◆ moveDataFromSysLogToSysHistory()

◆ unserializeToArray()

TYPO3\CMS\Install\Updates\SeparateSysHistoryFromSysLogUpdate::unserializeToArray ( string  $serialized)
protected

◆ updateNecessary()

bool TYPO3\CMS\Install\Updates\SeparateSysHistoryFromSysLogUpdate::updateNecessary ( )

Checks if an update is needed

Returns
‪bool Whether an update is needed (true) or not (false)

Implements TYPO3\CMS\Install\Updates\UpgradeWizardInterface.

Definition at line 72 of file SeparateSysHistoryFromSysLogUpdate.php.

References TYPO3\CMS\Install\Updates\SeparateSysHistoryFromSysLogUpdate\checkIfFieldInTableExists().

◆ updateTablesAndTrackProgress()

array TYPO3\CMS\Install\Updates\SeparateSysHistoryFromSysLogUpdate::updateTablesAndTrackProgress ( Connection  $connection,
Connection  $connectionForSysRegistry,
array  $updateData,
array  $logData,
array  $row 
)
protected

Update sys_history and sys_log tables

Also keep track of progress in sys_registry

Parameters
\TYPO3\CMS\Core\Database\Connection$connection
\TYPO3\CMS\Core\Database\Connection$connectionForSysRegistry
array$updateData
array$logData
array$row
Returns
‪array

Definition at line 241 of file SeparateSysHistoryFromSysLogUpdate.php.

References TYPO3\CMS\Install\Updates\SeparateSysHistoryFromSysLogUpdate\MOVE_DATA, TYPO3\CMS\Core\Database\Connection\PARAM_INT, and TYPO3\CMS\Core\Database\Connection\update().

Referenced by TYPO3\CMS\Install\Updates\SeparateSysHistoryFromSysLogUpdate\moveDataFromSysLogToSysHistory().

Member Data Documentation

◆ BATCH_SIZE

const TYPO3\CMS\Install\Updates\SeparateSysHistoryFromSysLogUpdate::BATCH_SIZE = 100
private

Definition at line 34 of file SeparateSysHistoryFromSysLogUpdate.php.

◆ MOVE_DATA

◆ UPDATE_HISTORY