TYPO3 CMS  TYPO3_6-2
TYPO3\CMS\Install\Updates\FileTableSplittingUpdate Class Reference
Inheritance diagram for TYPO3\CMS\Install\Updates\FileTableSplittingUpdate:
TYPO3\CMS\Install\Updates\AbstractUpdate

Public Member Functions

 checkForUpdate (&$description)
 
 performUpdate (array &$dbQueries, &$customMessages)
 
- Public Member Functions inherited from TYPO3\CMS\Install\Updates\AbstractUpdate
 getTitle ()
 
 setTitle ($title)
 
 getIdentifier ()
 
 setIdentifier ($identifier)
 
 shouldRenderWizard ()
 
 shouldRenderNextButton ()
 
 checkIfTableExists ($table)
 
 checkForUpdate (&$description)
 
 performUpdate (array &$dbQueries, &$customMessages)
 

Protected Member Functions

 detectFieldsToMigrate ()
 
- Protected Member Functions inherited from TYPO3\CMS\Install\Updates\AbstractUpdate
 markWizardAsDone ($confValue=1)
 
 isWizardDone ()
 
 getDatabaseConnection ()
 

Protected Attributes

 $metaDataTable = 'sys_file_metadata'
 
 $title = 'Migrate file metadata from sys_file to an external metadata table'
 
- Protected Attributes inherited from TYPO3\CMS\Install\Updates\AbstractUpdate
 $title
 
 $identifier
 

Additional Inherited Members

- Public Attributes inherited from TYPO3\CMS\Install\Updates\AbstractUpdate
 $pObj
 
 $userInput
 
 $versionNumber
 

Detailed Description

This file is part of the TYPO3 CMS project.

It is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, either version 2 of the License, or any later version.

For the full copyright and license information, please read the LICENSE.txt file that was distributed with this source code.

The TYPO3 project - inspiring people to share! Migrate metadata from sys_file table to sys_filemetadata. Also takes care of custom TCA fields if they have been created beforehand.

Author
Steffen Ritter steff.nosp@m.en.r.nosp@m.itter.nosp@m.@typ.nosp@m.o3.or.nosp@m.g

Definition at line 23 of file FileTableSplittingUpdate.php.

Member Function Documentation

◆ checkForUpdate()

TYPO3\CMS\Install\Updates\FileTableSplittingUpdate::checkForUpdate ( $description)

Checks if an update is needed

Parameters
string&$descriptionThe description for the update
Returns
boolean Whether an update is needed (TRUE) or not (FALSE)

Definition at line 42 of file FileTableSplittingUpdate.php.

References $GLOBALS, and $result.

◆ detectFieldsToMigrate()

TYPO3\CMS\Install\Updates\FileTableSplittingUpdate::detectFieldsToMigrate ( )
protected

Looks at the table sql definitions and checks which fields are present in both tables. ignories some Management field

Returns
array

Definition at line 104 of file FileTableSplittingUpdate.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Install\Updates\FileTableSplittingUpdate\performUpdate().

◆ performUpdate()

TYPO3\CMS\Install\Updates\FileTableSplittingUpdate::performUpdate ( array &  $dbQueries,
$customMessages 
)

Performs the database update. Won't run if the table is not present. Will stop if the table does not exist to give users the possibility to migrate custom fields to and therefore move their TCA and sql upfront.

Parameters
array&$dbQueriesQueries done in this update
mixed&$customMessagesCustom messages
Returns
boolean Whether it worked (TRUE) or not (FALSE)

Definition at line 72 of file FileTableSplittingUpdate.php.

References $GLOBALS, and TYPO3\CMS\Install\Updates\FileTableSplittingUpdate\detectFieldsToMigrate().

Member Data Documentation

◆ $metaDataTable

TYPO3\CMS\Install\Updates\FileTableSplittingUpdate::$metaDataTable = 'sys_file_metadata'
protected

Definition at line 29 of file FileTableSplittingUpdate.php.

◆ $title

TYPO3\CMS\Install\Updates\FileTableSplittingUpdate::$title = 'Migrate file metadata from sys_file to an external metadata table'
protected

Definition at line 34 of file FileTableSplittingUpdate.php.