32 $this->sqlSchemaMigrationService = new \TYPO3\CMS\Install\Service\SqlSchemaMigrationService();
41 $currentDatabaseSchema = $this->sqlSchemaMigrationService->getFieldDefinitions_database();
44 $currentDatabaseSchemaForBeUsers = array();
45 $currentDatabaseSchemaForBeUsers[
'be_users'] = $currentDatabaseSchema[
'be_users'];
46 unset($currentDatabaseSchema);
49 $expectedDatabaseSchemaForBeUsers = $currentDatabaseSchemaForBeUsers;
50 $expectedDatabaseSchemaForBeUsers[
'be_users'][
'fields'][
'functional_test_field_1'] =
"tinyint(1) unsigned NOT NULL default '0'";
51 $expectedDatabaseSchemaForBeUsers[
'be_users'][
'keys'][
'functional_test_key_1'] =
"KEY functional_test_key_1 (functional_test_field_1)";
52 $createFieldDiff = $this->sqlSchemaMigrationService->getDatabaseExtra($expectedDatabaseSchemaForBeUsers, $currentDatabaseSchemaForBeUsers);
53 $createFieldDiff = $this->sqlSchemaMigrationService->getUpdateSuggestions($createFieldDiff);
54 $this->sqlSchemaMigrationService->performUpdateQueries($createFieldDiff[
'add'], $createFieldDiff[
'add']);
57 unset($currentDatabaseSchemaForBeUsers[
'be_users'][
'fields'][
'functional_test_field_1']);
58 unset($currentDatabaseSchemaForBeUsers[
'be_users'][
'keys'][
'functional_test_key_1']);
59 $this->sqlSchemaMigrationService->setDeletedPrefixKey(
'');
60 $removeFieldDiff = $this->sqlSchemaMigrationService->getDatabaseExtra($expectedDatabaseSchemaForBeUsers, $currentDatabaseSchemaForBeUsers);
61 $removeFieldDiff = $this->sqlSchemaMigrationService->getUpdateSuggestions($removeFieldDiff,
'remove');
62 $result = $this->sqlSchemaMigrationService->performUpdateQueries($removeFieldDiff[
'drop'], $removeFieldDiff[
'drop']);
63 $this->assertTrue(
$result,
'performUpdateQueries() did not return TRUE, this means an error occurred: ' . (is_array(
$result) ? array_pop(
$result) :
''));
columnAndKeyDeletionDoesNotReturnAnError()
if($list_of_literals) if(!empty($literals)) if(!empty($literals)) $result
Analyse literals to prepend the N char to them if their contents aren't numeric.
$sqlSchemaMigrationService