Project

General

Profile

Actions

Bug #78771

closed

ConnectionMigrator does not handle renamed columns

Added by Stefan Froemken almost 8 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Database API (Doctrine DBAL)
Target version:
Start date:
2016-11-23
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
8
PHP Version:
7.0
Tags:
Complexity:
medium
Is Regression:
No
Sprint Focus:

Description

Hello Core-Team,

in our extension events2 I have renamed the column "events" to "event", but "Database analyzer" can not detect that change. So currently I have to rename that column on my own on DB directly.

SchemaDiff class of Doctrine DBAL compares the arrays of addedColumns against removedColumns. If some Options are the same the SchemaDiff class moves that difference to renamedColumns and DELETEs the entries from addedColumns and removedColumns.

In ConnectionManager you only collect the values of addedColumns (Method: getNewFieldUpdateSuggestions) and removedColumns (Method: getUnusedFieldUpdateSuggestions), but there is no check against renamedColumns.

In the meanwhile I have 12 tables incl. some TYPO3 tables like sys_file_metadata and pages which could not be migrated because of renamedColumns.

Stefan


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
Precedes TYPO3 Core - Bug #81756: DatabaseSchemaComparator does not handle renamed columnsClosed

Actions
Actions

Also available in: Atom PDF