[BUGFIX] Correctly create schema diff for renamed fields and indexes 87/58787/5
authorHelmut Hummel <typo3@helhum.io>
Mon, 29 Oct 2018 23:30:03 +0000 (00:30 +0100)
committerGeorg Ringer <georg.ringer@gmail.com>
Thu, 8 Nov 2018 20:55:57 +0000 (21:55 +0100)
commit1a66bc91986e5cc4697eabd40728120e44036db3
tree06e6693b7be0721a6206bcf81b059fa6f2585164
parent2a565fa670bc520e6fb253c23808fa9367361b2f
[BUGFIX] Correctly create schema diff for renamed fields and indexes

TYPO3's schema migrator has code to create drop and add fields
statements out of renamed columns detected by doctrine.

This code however is never triggered, when using a MySQL connection
with tableoptions set, because then a new TableDiff object is created,
which does not contain the renamedColumns any more.

This fix tackles the issue in various places:

1. The charset is pulled out as well of the information_schema,
so that it is set in source and target schema objects and
table options stay the same for source and target schema.

2. The newly created table differences objects receive
the detected renamed columns and idexes.

Releases: master
Resolves: #86793
Change-Id: Iee6bc47ccf066cf9ccd7692af34e437e57695144
Reviewed-on: https://review.typo3.org/58787
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
typo3/sysext/core/Classes/Database/Schema/Comparator.php
typo3/sysext/core/Classes/Database/Schema/ConnectionMigrator.php