DatabaseRowsUpdateWizard

class \TYPO3\CMS\Install\Updates\DatabaseRowsUpdateWizard

Implements
UpgradeWizardInterface, RepeatableInterface

This is a generic updater to migrate content of TCA rows.

Multiple classes implementing interface "RowUpdateInterface" can be registered here, each for a specific update purpose.

The updater fetches each row of all TCA registered tables and visits the client classes who may modify the row content.

The updater remembers for each class if it run through, so the updater will be shown again if a new updater class is registered that has not been run yet.

A start position pointer is stored in the registry that is updated during the run process, so if for instance the PHP process runs into a timeout, the job can restart at the position it stopped.

Table of Contents

Interfaces

UpgradeWizardInterface
Interface UpgradeWizardInterface
RepeatableInterface
Use if wizard may be run multiple times (and should not be disabled after one run)

Properties

$rowUpdater  : array

Methods

executeUpdate()  : bool
Performs the configuration update.
getAvailableRowUpdater()  : string[]
getDescription()  : string
Return the description for this wizard
getIdentifier()  : string
Return the identifier for this wizard This should be the same string as used in the ext_localconf class registration
getPrerequisites()  : string[]
Returns an array of class names of Prerequisite classes
getTitle()  : string
Return the speaking name of this wizard
updateNecessary()  : bool
Is an update necessary?
getRowUpdatersToExecute()  : array
Return an array of class names that are not yet marked as done.
getStartPosition()  : array
Return an array with table / uid combination that specifies the start position the update row process should start with.
setRowUpdaterExecuted()  : mixed
Mark a single updater as done
updateOrDeleteRow()  : void

Properties

$rowUpdater

protected array $rowUpdater = [\TYPO3\CMS\Install\Updates\RowUpdater\WorkspaceVersionRecor…
Show the full value[\TYPO3\CMS\Install\Updates\RowUpdater\WorkspaceVersionRecordsMigration::class, \TYPO3\CMS\Install\Updates\RowUpdater\L18nDiffsourceToJsonMigration::class, \TYPO3\CMS\Install\Updates\RowUpdater\WorkspaceMovePlaceholderRemovalMigration::class, \TYPO3\CMS\Install\Updates\RowUpdater\WorkspaceNewPlaceholderRemovalMigration::class]

Single classes that may update rows

Methods

executeUpdate()

Performs the configuration update.

public executeUpdate() : bool

Tags

throws
ConnectionException
throws
Exception

Return values

bool

getAvailableRowUpdater()

public getAvailableRowUpdater() : string[]

Return values

string[]

getDescription()

Return the description for this wizard

public getDescription() : string

Tags

throws
RuntimeException

Return values

string —

Longer description of this updater

getIdentifier()

Return the identifier for this wizard This should be the same string as used in the ext_localconf class registration

public getIdentifier() : string

Return values

string —

Unique identifier of this updater

getPrerequisites()

Returns an array of class names of Prerequisite classes

public getPrerequisites() : string[]

Return values

string[] —

All new fields and tables must exist

getTitle()

Return the speaking name of this wizard

public getTitle() : string

Return values

string —

Title of this updater

updateNecessary()

Is an update necessary?

public updateNecessary() : bool

Return values

bool —

True if at least one row updater is not marked done

getRowUpdatersToExecute()

Return an array of class names that are not yet marked as done.

protected getRowUpdatersToExecute() : array

Return values

array —

Class names

getStartPosition()

Return an array with table / uid combination that specifies the start position the update row process should start with.

protected getStartPosition(string $firstTable) : array

Parameters

$firstTable : string

Table name of the first TCA in case the start position needs to be initialized

Return values

array —

New start position

updateOrDeleteRow()

protected updateOrDeleteRow(Connection $connectionForTable, Connection $connectionForSysRegistry, string $table, int $uid, array $updatedFields, array $startPosition) : void

Parameters

$connectionForTable : Connection
$connectionForSysRegistry : Connection
$table : string
$uid : int
$updatedFields : array
$startPosition : array
On this page