Bug #81756
closed
DatabaseSchemaComparator does not handle renamed columns
Added by Robert Vock over 7 years ago.
Updated almost 4 years ago.
Category:
Database API (Doctrine DBAL)
Description
This is a followup to #78771
When adding and removing columns to the same table, the Doctrine Comparator saves these changes in a `renamedColumns` property. When rebuilding the TableDiff class this information is dropped:
Database\Schema\Comparator:73
This leads to fields which are can not be added in the install tool.
- Due date set to 2016-11-24
- Start date changed from 2017-06-30 to 2016-11-24
- Follows Bug #78771: ConnectionMigrator does not handle renamed columns added
- Due date deleted (
2016-11-24)
- Start date deleted (
2016-11-24)
- Assignee set to Morton Jonuschat
- Target version set to Candidate for patchlevel
- Assignee deleted (
Morton Jonuschat)
uh. i think i confirmed that issue. nasty. adding me as watcher, we should fix that ...
tested: i renamed text_42 to text_43 in ext:styleguide and would have expected db analyzer shows me an addition and a removal, but it does not.
- Related to Bug #86793: Renamed columns are not correctly detected by database schema diff added
It appears this is fixed in TYPO3 9 with #86793 but not in TYPO3 8.
But this bug currently prevents an update from TYPO3 7 to 8. Applying the fix from #86793 to Comparator.php solved this for me.
I just had another TYPO3 Update which broke in TYPO3 v8 because this fix is not backported :(
It would be REALLY nice, if this fix was in TYPO3 v8.
For those also affected on TYPO3 8, I would recommend to install composer-patches and apply the bugfix from #86793.
composer require cweagans/composer-patches
And then within composer.json, add the following:
{
"extra": {
"patches": {
"typo3/cms": {
"Fix broken Database renames": "https://forge.typo3.org/projects/typo3cms-core/repository/revisions/1a66bc91986e5cc4697eabd40728120e44036db3/diff/typo3/sysext/core/Classes/Database/Schema/Comparator.php?format=diff"
}
}
}
}
- Status changed from New to Closed
I would also propose that those hit by this issue in old v8 installations use the work around Robert posted as this bug won't be fixed in v8 anymore.
Due to a forge change for the patch URLs, the URL has changed:
{
"extra": {
"patches": {
"typo3/cms": {
"Fix broken Database renames": "https://forge.typo3.org/projects/typo3cms-core/repository/1749/revisions/1a66bc91986e5cc4697eabd40728120e44036db3/diff?format=diff"
}
}
}
}
Also available in: Atom
PDF