‪TYPO3CMS  10.4
TYPO3\CMS\Core\Tests\Functional\Database\Schema\SchemaMigratorTest Class Reference
Inheritance diagram for TYPO3\CMS\Core\Tests\Functional\Database\Schema\SchemaMigratorTest:

Public Member Functions

 createNewTable ()
 
 createNewTableIfNotExists ()
 
 addNewColumns ()
 
 changeExistingColumn ()
 
 notNullWithoutDefaultValue ()
 
 defaultNullWithoutNotNull ()
 
 renameUnusedField ()
 
 renameUnusedTable ()
 
 dropUnusedField ()
 
 dropUnusedTable ()
 
 installPerformsOnlyAddAndCreateOperations ()
 
 installDoesNotAddIndexOnChangedColumn ()
 
 changeExistingIndex ()
 
 installCanPerformChangeOperations ()
 
 importStaticDataInsertsRecords ()
 
 importStaticDataIgnoresTableDefinitions ()
 
 changeTableEngine ()
 

Protected Member Functions

 setUp ()
 
 tearDown ()
 
 prepareTestTable (bool $createOnly=true)
 
Doctrine DBAL Schema Table getTableDetails ()
 
array readFixtureFile (string $fixtureName)
 

Protected Attributes

SqlReader $sqlReader
 
ConnectionPool $connectionPool
 
AbstractSchemaManager $schemaManager
 
TYPO3 CMS Core Database Schema SchemaMigrator $subject
 
string $tableName = 'a_test_table'
 

Detailed Description

Test case

Definition at line 33 of file SchemaMigratorTest.php.

Member Function Documentation

◆ addNewColumns()

◆ changeExistingColumn()

◆ changeExistingIndex()

◆ changeTableEngine()

TYPO3\CMS\Core\Tests\Functional\Database\Schema\SchemaMigratorTest::changeTableEngine ( )

◆ createNewTable()

◆ createNewTableIfNotExists()

TYPO3\CMS\Core\Tests\Functional\Database\Schema\SchemaMigratorTest::createNewTableIfNotExists ( )

◆ defaultNullWithoutNotNull()

◆ dropUnusedField()

TYPO3\CMS\Core\Tests\Functional\Database\Schema\SchemaMigratorTest::dropUnusedField ( )

◆ dropUnusedTable()

TYPO3\CMS\Core\Tests\Functional\Database\Schema\SchemaMigratorTest::dropUnusedTable ( )

◆ getTableDetails()

◆ importStaticDataIgnoresTableDefinitions()

TYPO3\CMS\Core\Tests\Functional\Database\Schema\SchemaMigratorTest::importStaticDataIgnoresTableDefinitions ( )
Test:

Definition at line 394 of file SchemaMigratorTest.php.

◆ importStaticDataInsertsRecords()

TYPO3\CMS\Core\Tests\Functional\Database\Schema\SchemaMigratorTest::importStaticDataInsertsRecords ( )
Test:
‪@group not-postgres @group not-mssql @group not-sqlite

Definition at line 381 of file SchemaMigratorTest.php.

◆ installCanPerformChangeOperations()

TYPO3\CMS\Core\Tests\Functional\Database\Schema\SchemaMigratorTest::installCanPerformChangeOperations ( )

◆ installDoesNotAddIndexOnChangedColumn()

TYPO3\CMS\Core\Tests\Functional\Database\Schema\SchemaMigratorTest::installDoesNotAddIndexOnChangedColumn ( )

Disabled on sqlite: The platform seems to have issues with indexes for currently unknown reasons. If that is sorted out, this test can probably be enabled.

Test:

Definition at line 308 of file SchemaMigratorTest.php.

References TYPO3\CMS\Core\Tests\Functional\Database\Schema\SchemaMigratorTest\getTableDetails(), and TYPO3\CMS\Core\Tests\Functional\Database\Schema\SchemaMigratorTest\readFixtureFile().

◆ installPerformsOnlyAddAndCreateOperations()

TYPO3\CMS\Core\Tests\Functional\Database\Schema\SchemaMigratorTest::installPerformsOnlyAddAndCreateOperations ( )

◆ notNullWithoutDefaultValue()

TYPO3\CMS\Core\Tests\Functional\Database\Schema\SchemaMigratorTest::notNullWithoutDefaultValue ( )

Disabled on sqlite: It does not support adding a not null column to an existing table and throws "Cannot add a NOT NULL column with default value NULL". It's currently unclear if core should handle that by changing the alter table statement on the fly.

Test:
‪@group not-sqlite

Definition at line 169 of file SchemaMigratorTest.php.

References TYPO3\CMS\Core\Database\ConnectionPool\DEFAULT_CONNECTION_NAME, TYPO3\CMS\Core\Tests\Functional\Database\Schema\SchemaMigratorTest\getTableDetails(), and TYPO3\CMS\Core\Tests\Functional\Database\Schema\SchemaMigratorTest\readFixtureFile().

◆ prepareTestTable()

TYPO3\CMS\Core\Tests\Functional\Database\Schema\SchemaMigratorTest::prepareTestTable ( bool  $createOnly = true)
protected

◆ readFixtureFile()

array TYPO3\CMS\Core\Tests\Functional\Database\Schema\SchemaMigratorTest::readFixtureFile ( string  $fixtureName)
protected

Helper to read a fixture SQL file and convert it into a statement array.

Parameters
string$fixtureName
Returns
‪array

Definition at line 457 of file SchemaMigratorTest.php.

Referenced by TYPO3\CMS\Core\Tests\Functional\Database\Schema\SchemaMigratorTest\addNewColumns(), TYPO3\CMS\Core\Tests\Functional\Database\Schema\SchemaMigratorTest\changeExistingColumn(), TYPO3\CMS\Core\Tests\Functional\Database\Schema\SchemaMigratorTest\changeExistingIndex(), TYPO3\CMS\Core\Tests\Functional\Database\Schema\SchemaMigratorTest\changeTableEngine(), TYPO3\CMS\Core\Tests\Functional\Database\Schema\SchemaMigratorTest\createNewTable(), TYPO3\CMS\Core\Tests\Functional\Database\Schema\SchemaMigratorTest\createNewTableIfNotExists(), TYPO3\CMS\Core\Tests\Functional\Database\Schema\SchemaMigratorTest\defaultNullWithoutNotNull(), TYPO3\CMS\Core\Tests\Functional\Database\Schema\SchemaMigratorTest\dropUnusedField(), TYPO3\CMS\Core\Tests\Functional\Database\Schema\SchemaMigratorTest\dropUnusedTable(), TYPO3\CMS\Core\Tests\Functional\Database\Schema\SchemaMigratorTest\installCanPerformChangeOperations(), TYPO3\CMS\Core\Tests\Functional\Database\Schema\SchemaMigratorTest\installDoesNotAddIndexOnChangedColumn(), TYPO3\CMS\Core\Tests\Functional\Database\Schema\SchemaMigratorTest\installPerformsOnlyAddAndCreateOperations(), TYPO3\CMS\Core\Tests\Functional\Database\Schema\SchemaMigratorTest\notNullWithoutDefaultValue(), TYPO3\CMS\Core\Tests\Functional\Database\Schema\SchemaMigratorTest\prepareTestTable(), TYPO3\CMS\Core\Tests\Functional\Database\Schema\SchemaMigratorTest\renameUnusedField(), and TYPO3\CMS\Core\Tests\Functional\Database\Schema\SchemaMigratorTest\renameUnusedTable().

◆ renameUnusedField()

◆ renameUnusedTable()

TYPO3\CMS\Core\Tests\Functional\Database\Schema\SchemaMigratorTest::renameUnusedTable ( )

◆ setUp()

TYPO3\CMS\Core\Tests\Functional\Database\Schema\SchemaMigratorTest::setUp ( )
protected

◆ tearDown()

TYPO3\CMS\Core\Tests\Functional\Database\Schema\SchemaMigratorTest::tearDown ( )
protected

Tears down this test suite.

Definition at line 71 of file SchemaMigratorTest.php.

Member Data Documentation

◆ $connectionPool

ConnectionPool TYPO3\CMS\Core\Tests\Functional\Database\Schema\SchemaMigratorTest::$connectionPool
protected

Definition at line 41 of file SchemaMigratorTest.php.

◆ $schemaManager

AbstractSchemaManager TYPO3\CMS\Core\Tests\Functional\Database\Schema\SchemaMigratorTest::$schemaManager
protected

Definition at line 45 of file SchemaMigratorTest.php.

◆ $sqlReader

SqlReader TYPO3\CMS\Core\Tests\Functional\Database\Schema\SchemaMigratorTest::$sqlReader
protected

Definition at line 37 of file SchemaMigratorTest.php.

◆ $subject

TYPO3 CMS Core Database Schema SchemaMigrator TYPO3\CMS\Core\Tests\Functional\Database\Schema\SchemaMigratorTest::$subject
protected

Definition at line 49 of file SchemaMigratorTest.php.

◆ $tableName

string TYPO3\CMS\Core\Tests\Functional\Database\Schema\SchemaMigratorTest::$tableName = 'a_test_table'
protected

Definition at line 53 of file SchemaMigratorTest.php.