[FEATURE] Doctrine: Implement SchemaMigrationService 93/49593/16
authorMorton Jonuschat <m.jonuschat@mojocode.de>
Wed, 24 Aug 2016 12:57:46 +0000 (14:57 +0200)
committerMorton Jonuschat <m.jonuschat@mojocode.de>
Wed, 31 Aug 2016 20:28:51 +0000 (22:28 +0200)
commit2ba08444c9cd7613c97e10b65fd53867565f205c
tree438fa8af76f6e8226dbded536cd0153be21bfdbe
parentf3af0744b60f292a5bf478da7c3bf6170c5a09f8
[FEATURE] Doctrine: Implement SchemaMigrationService

Implement a SQL schema migration service based on an actual
parser for CREATE TABLE statements that are mapped to Doctrine
Table objects. This enables the use of the Doctrine DBAL
SchemaManager for all schema modifications.

The new Schema migration service is fully aware of multiple
database connections and normalizes MySQL specific data types
to standard compliant types. This mostly affects the TINYINT
data type which gets converted to a SMALLINT.

Resolves: #77643
Resolves: #77369
Resolves: #76508
Resolves: #76641
Resolves: #75205
Resolves: #71645
Resolves: #44991
Releases: master
Change-Id: Ic56941c2ae9717836d89bce74261d11424da340b
Reviewed-on: https://review.typo3.org/49593
Tested-by: Bamboo TYPO3com <info@typo3.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
106 files changed:
typo3/sysext/core/Classes/Database/Connection.php
typo3/sysext/core/Classes/Database/ConnectionPool.php
typo3/sysext/core/Classes/Database/Schema/EventListener/SchemaColumnDefinitionListener.php [new file with mode: 0644]
typo3/sysext/core/Classes/Database/Schema/Exception/StatementException.php [new file with mode: 0644]
typo3/sysext/core/Classes/Database/Schema/Exception/UnexpectedSignalReturnValueTypeException.php [new file with mode: 0644]
typo3/sysext/core/Classes/Database/Schema/Parser/AST/AbstractCreateDefinitionItem.php [new file with mode: 0644]
typo3/sysext/core/Classes/Database/Schema/Parser/AST/AbstractCreateStatement.php [new file with mode: 0644]
typo3/sysext/core/Classes/Database/Schema/Parser/AST/CreateColumnDefinitionItem.php [new file with mode: 0644]
typo3/sysext/core/Classes/Database/Schema/Parser/AST/CreateDefinition.php [new file with mode: 0644]
typo3/sysext/core/Classes/Database/Schema/Parser/AST/CreateForeignKeyDefinitionItem.php [new file with mode: 0644]
typo3/sysext/core/Classes/Database/Schema/Parser/AST/CreateIndexDefinitionItem.php [new file with mode: 0644]
typo3/sysext/core/Classes/Database/Schema/Parser/AST/CreateTableClause.php [new file with mode: 0644]
typo3/sysext/core/Classes/Database/Schema/Parser/AST/CreateTableStatement.php [new file with mode: 0644]
typo3/sysext/core/Classes/Database/Schema/Parser/AST/DataType/AbstractDataType.php [new file with mode: 0644]
typo3/sysext/core/Classes/Database/Schema/Parser/AST/DataType/BigIntDataType.php [new file with mode: 0644]
typo3/sysext/core/Classes/Database/Schema/Parser/AST/DataType/BinaryDataType.php [new file with mode: 0644]
typo3/sysext/core/Classes/Database/Schema/Parser/AST/DataType/BitDataType.php [new file with mode: 0644]
typo3/sysext/core/Classes/Database/Schema/Parser/AST/DataType/BlobDataType.php [new file with mode: 0644]
typo3/sysext/core/Classes/Database/Schema/Parser/AST/DataType/CharDataType.php [new file with mode: 0644]
typo3/sysext/core/Classes/Database/Schema/Parser/AST/DataType/DateDataType.php [new file with mode: 0644]
typo3/sysext/core/Classes/Database/Schema/Parser/AST/DataType/DateTimeDataType.php [new file with mode: 0644]
typo3/sysext/core/Classes/Database/Schema/Parser/AST/DataType/DecimalDataType.php [new file with mode: 0644]
typo3/sysext/core/Classes/Database/Schema/Parser/AST/DataType/DoubleDataType.php [new file with mode: 0644]
typo3/sysext/core/Classes/Database/Schema/Parser/AST/DataType/EnumDataType.php [new file with mode: 0644]
typo3/sysext/core/Classes/Database/Schema/Parser/AST/DataType/FloatDataType.php [new file with mode: 0644]
typo3/sysext/core/Classes/Database/Schema/Parser/AST/DataType/IntegerDataType.php [new file with mode: 0644]
typo3/sysext/core/Classes/Database/Schema/Parser/AST/DataType/JsonDataType.php [new file with mode: 0644]
typo3/sysext/core/Classes/Database/Schema/Parser/AST/DataType/LongBlobDataType.php [new file with mode: 0644]
typo3/sysext/core/Classes/Database/Schema/Parser/AST/DataType/LongTextDataType.php [new file with mode: 0644]
typo3/sysext/core/Classes/Database/Schema/Parser/AST/DataType/MediumBlobDataType.php [new file with mode: 0644]
typo3/sysext/core/Classes/Database/Schema/Parser/AST/DataType/MediumIntDataType.php [new file with mode: 0644]
typo3/sysext/core/Classes/Database/Schema/Parser/AST/DataType/MediumTextDataType.php [new file with mode: 0644]
typo3/sysext/core/Classes/Database/Schema/Parser/AST/DataType/NumericDataType.php [new file with mode: 0644]
typo3/sysext/core/Classes/Database/Schema/Parser/AST/DataType/RealDataType.php [new file with mode: 0644]
typo3/sysext/core/Classes/Database/Schema/Parser/AST/DataType/SetDataType.php [new file with mode: 0644]
typo3/sysext/core/Classes/Database/Schema/Parser/AST/DataType/SmallIntDataType.php [new file with mode: 0644]
typo3/sysext/core/Classes/Database/Schema/Parser/AST/DataType/TextDataType.php [new file with mode: 0644]
typo3/sysext/core/Classes/Database/Schema/Parser/AST/DataType/TimeDataType.php [new file with mode: 0644]
typo3/sysext/core/Classes/Database/Schema/Parser/AST/DataType/TimestampDataType.php [new file with mode: 0644]
typo3/sysext/core/Classes/Database/Schema/Parser/AST/DataType/TinyBlobDataType.php [new file with mode: 0644]
typo3/sysext/core/Classes/Database/Schema/Parser/AST/DataType/TinyIntDataType.php [new file with mode: 0644]
typo3/sysext/core/Classes/Database/Schema/Parser/AST/DataType/TinyTextDataType.php [new file with mode: 0644]
typo3/sysext/core/Classes/Database/Schema/Parser/AST/DataType/VarBinaryDataType.php [new file with mode: 0644]
typo3/sysext/core/Classes/Database/Schema/Parser/AST/DataType/VarCharDataType.php [new file with mode: 0644]
typo3/sysext/core/Classes/Database/Schema/Parser/AST/DataType/YearDataType.php [new file with mode: 0644]
typo3/sysext/core/Classes/Database/Schema/Parser/AST/Identifier.php [new file with mode: 0644]
typo3/sysext/core/Classes/Database/Schema/Parser/AST/IndexColumnName.php [new file with mode: 0644]
typo3/sysext/core/Classes/Database/Schema/Parser/AST/ReferenceDefinition.php [new file with mode: 0644]
typo3/sysext/core/Classes/Database/Schema/Parser/Lexer.php [new file with mode: 0644]
typo3/sysext/core/Classes/Database/Schema/Parser/Parser.php [new file with mode: 0644]
typo3/sysext/core/Classes/Database/Schema/Parser/TableBuilder.php [new file with mode: 0644]
typo3/sysext/core/Classes/Database/Schema/SchemaMigrator.php [new file with mode: 0644]
typo3/sysext/core/Classes/Database/Schema/SqlReader.php [new file with mode: 0644]
typo3/sysext/core/Classes/Database/Schema/Types/EnumType.php [new file with mode: 0644]
typo3/sysext/core/Classes/Database/Schema/Types/SetType.php [new file with mode: 0644]
typo3/sysext/core/Documentation/Changelog/master/Feature-77643-ReimplementSqlSchemaMigrationServiceUsingDoctrineSchemaManager.rst [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/Database/Fixtures/addColumnsToTable.sql [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/Database/Fixtures/addCreateChange.sql [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/Database/Fixtures/changeExistingColumn.sql [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/Database/Fixtures/defaultNullWithoutNotNull.sql [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/Database/Fixtures/ifNotExists.sql [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/Database/Fixtures/importStaticData.sql [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/Database/Fixtures/newTable.sql [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/Database/Fixtures/notNullWithoutDefaultValue.sql [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/Database/Fixtures/unusedColumn.sql [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/Database/Fixtures/unusedTable.sql [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/Database/Schema/SchemaMigrationServiceTest.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Database/Schema/EventListener/SchemaColumnDefinitionListenerTest.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Database/Schema/Fixtures/tablebuilder.sql [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Database/Schema/Parser/AbstractDataTypeBaseTestCase.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Database/Schema/Parser/ColumnDefinitionAttributesTest.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Database/Schema/Parser/ColumnDefinitionItemTest.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Database/Schema/Parser/CreateTableFragmentTest.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Database/Schema/Parser/DataTypeAttributes/CharacterTypeAttributesTest.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Database/Schema/Parser/DataTypeAttributes/EnumerationTypeAttributesTest.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Database/Schema/Parser/DataTypeAttributes/NumericTypeAttributesTest.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Database/Schema/Parser/DataTypes/BinaryDataTypeTest.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Database/Schema/Parser/DataTypes/BitDataTypeTest.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Database/Schema/Parser/DataTypes/BlobTypesTest.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Database/Schema/Parser/DataTypes/CharDataTypeTest.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Database/Schema/Parser/DataTypes/DateTimeTypesTest.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Database/Schema/Parser/DataTypes/EnumDataTypeTest.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Database/Schema/Parser/DataTypes/FixedPointTypesTest.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Database/Schema/Parser/DataTypes/FloatingPointTypesTest.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Database/Schema/Parser/DataTypes/IntegerTypesTest.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Database/Schema/Parser/DataTypes/JsonDataTypeTest.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Database/Schema/Parser/DataTypes/SetDataTypeTest.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Database/Schema/Parser/DataTypes/TextTypesTest.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Database/Schema/Parser/ForeignKeyDefinitionTest.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Database/Schema/Parser/IndexDefinitionTest.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Database/Schema/Parser/ReferenceDefinitionTest.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Database/Schema/Parser/TableBuilderTest.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Database/Schema/Parser/TableOptionsTest.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Database/Schema/SqlReaderTest.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Database/Schema/Types/EnumTypeTest.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Database/Schema/Types/SetTypeTest.php [new file with mode: 0644]
typo3/sysext/extensionmanager/Classes/Utility/InstallUtility.php
typo3/sysext/install/Classes/Controller/Action/Step/DatabaseData.php
typo3/sysext/install/Classes/Controller/Action/Tool/ImportantActions.php
typo3/sysext/install/Classes/Controller/Action/Tool/UpgradeWizard.php
typo3/sysext/install/Classes/Service/SqlExpectedSchemaService.php
typo3/sysext/install/Classes/Service/SqlSchemaMigrationService.php
typo3/sysext/install/Classes/Updates/AbstractDatabaseSchemaUpdate.php
typo3/sysext/install/Classes/Updates/ExtensionManagerTables.php
typo3/sysext/install/Classes/Updates/FinalDatabaseSchemaUpdate.php
typo3/sysext/install/Classes/Updates/InitialDatabaseSchemaUpdate.php