Project

General

Profile

Actions

Bug #81756

closed

DatabaseSchemaComparator does not handle renamed columns

Added by Robert Vock over 6 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Database API (Doctrine DBAL)
Start date:
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
Is Regression:
Yes
Sprint Focus:

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.


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #86793: Renamed columns are not correctly detected by database schema diffClosed2018-10-30

Actions
Follows TYPO3 Core - Bug #78771: ConnectionMigrator does not handle renamed columnsClosed2016-11-23

Actions
Actions #1

Updated by Robert Vock over 6 years ago

  • 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
Actions #2

Updated by Robert Vock over 6 years ago

  • Due date deleted (2016-11-24)
  • Start date deleted (2016-11-24)
Actions #3

Updated by Morton Jonuschat over 6 years ago

  • Assignee set to Morton Jonuschat
  • Target version set to Candidate for patchlevel
Actions #4

Updated by Christian Kuhn over 5 years ago

  • 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.

Actions #5

Updated by Christian Kuhn over 5 years ago

  • Related to Bug #86793: Renamed columns are not correctly detected by database schema diff added
Actions #6

Updated by Robert Vock about 5 years ago

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.

Actions #7

Updated by Robert Vock over 4 years ago

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.

Actions #8

Updated by Robert Vock over 4 years ago

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" 
            }
        }
    }
}

Actions #9

Updated by Susanne Moog about 4 years ago

  • 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.

Actions #10

Updated by Robert Vock about 3 years ago

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" 
            }
        }
    }
}

Actions

Also available in: Atom PDF