TYPO3 CMS  TYPO3_6-2
AbstractDatabaseSchemaUpdate.php
Go to the documentation of this file.
1 <?php
3 
23 
27  protected $title;
28 
33 
38 
42  protected $objectManager;
43 
47  public function __construct() {
48  $this->objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManager');
49  $this->schemaMigrationService = $this->objectManager->get('TYPO3\\CMS\\Install\\Service\\SqlSchemaMigrationService');
50  $this->expectedSchemaService = $this->objectManager->get('TYPO3\\CMS\\Install\\Service\\SqlExpectedSchemaService');
51  }
52 
58  protected function getDatabaseDifferences() {
59  $expectedSchema = $this->expectedSchemaService->getExpectedDatabaseSchema();
60  $currentSchema = $this->schemaMigrationService->getFieldDefinitions_database();
61 
62  // Difference from expected to current
63  return $this->schemaMigrationService->getDatabaseExtra($expectedSchema, $currentSchema);
64  }
65 
66 }