Feature #67301

Don't suggest database alterations for functionally equivalent field types with DBAL

Added by Morton Jonuschat about 1 month ago. Updated 14 days ago.

Status:Resolved Start date:2015-06-05
Priority:Should have Due date:
Assigned To:Morton Jonuschat % Done:

100%

Category:Install Tool Spent time: -
Target version:-
PHP Version:5.6 Sprint Focus:
Complexity:

Description

When using the InstallTool with the DBAL extension a lot of database alterations will be suggested that can never be resolved due to MySQL specific field types.
When the extension DBAL is loaded accept field types that only differ in their storage space requirements as long as they are functionally equivalent. Example:

TINYTEXT -> VARCHAR is OK
TINYINT -> SMALLINT, INTEGER, BIGINT is OK
INTEGER -> BIGINT is OK
MEDIUMINT -> INTEGER is OK
MEDIUMINT -> SMALLINT is NOT OK

Especially integer types which have lower min/max values should still be migrated.

Also ignore length information for INT fields as this information is purely for display purposes and doesn't change anything in regard to the values that can be stored in the field. Also the display width is ignored when the value exceeds it.


Related issues

related to Core - Epic #64459: Make TYPO3 run on PostgreSQL New 2015-01-23
blocked by Core - Bug #67445: ALTER TABLE ADD KEY / DROP KEY unsupported Resolved 2015-06-14

Associated revisions

Revision f9205842
Added by Morton Jonuschat 14 days ago

[TASK] dbal: skip update suggestions for equivalent fields in Install Tool

Make the Install Tool / Database Upgrade Wizard ignore database
alterations for functionally equivalent field types / indexes when
used with DBAL. This is required as some special MySQL native fields
like TINYTEXT, TINY- and MEDIUMINT have no matching types and will
get converted by ADOdb to a type that is able to store longer/bigger
values.

This patch makes the SqlSchemaMigrationService check with the DBAL
Driver which field type/index definition will be used and updates
the field type requested by the database compare to reflect the actual
field type for the DBMS.

Resolves: #67301
Releases: master
Change-Id: I7f28ab38b66a224344069c42744e75bf63e222e6
Reviewed-on: http://review.typo3.org/40455
Reviewed-by: Christian Kuhn <>
Tested-by: Christian Kuhn <>
Reviewed-by: Andreas Fernandez <>
Tested-by: Andreas Fernandez <>

History

#1 Updated by Morton Jonuschat about 1 month ago

  • Assigned To set to Morton Jonuschat

#2 Updated by Morton Jonuschat about 1 month ago

  • Status changed from New to In Progress

Waiting for related patches to get review/merged as this depends on a lot of other bugfixes

#3 Updated by Gerrit Code Review about 1 month ago

  • Status changed from In Progress to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/40455

#4 Updated by Gerrit Code Review about 1 month ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/40455

#5 Updated by Gerrit Code Review 18 days ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/40455

#6 Updated by Gerrit Code Review 16 days ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/40455

#7 Updated by Gerrit Code Review 14 days ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/40455

#8 Updated by Gerrit Code Review 14 days ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/40455

#9 Updated by Gerrit Code Review 14 days ago

Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/40455

#10 Updated by Morton Jonuschat 14 days ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF