Project

General

Profile

Actions

Bug #85214

closed

Inform BE user, if extension installation possibly requires DB updates

Added by Michael Schams almost 6 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Extension Manager
Target version:
-
Start date:
2018-06-11
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
9
PHP Version:
7.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

#85160 (non destructive database schema changes in Extension Manager) introduced the following behaviour:

If for example a new version of an extension brings a new column, index or table that does not exist locally yet, it will be added. If the extension however changes the length of an existing field or removes a column, index or table definition, these changes are not automatically applied when loading or updating the extension. Administrators use the database analyzer in Admin Tools -> Maintenance view to review and perform these potentially destructive changes manually.

This means, if a BE users installs a new extension, which changes an existing table in a destructive way, the installation goes through without warning and without the change being applied. However, the BE user is not aware of that (TYPO3 did not explicitly informed him/her). As a consequence, whenever (always!) someone installs an extension, it is now required to check "Admin Tools -> Maintenance -> Analyze Database Structure", if the installation possibly requires DB updates, which have not been executed during the installation process.

For example: an demo extension comes with the following SQL file.

CREATE TABLE be_users (
  username varchar(10) DEFAULT '' NOT NULL,
  new_field varchar(10) DEFAULT '' NOT NULL
);

On installation, only one of the two fields are applied: the new field "new_field". Without checking the database structure, the BE user is not aware that the extension also wanted to change the "username" field.

As a solution, the Extension Manager should explicitly inform the BE user that outstanding database changes exist, which can be reviewed and possibly executed in the Maintenance section.


Files

screenshot0009x.png (28.4 KB) screenshot0009x.png Michael Schams, 2018-06-11 08:18

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Task #85215: Have EM only evaluate current ext_tables.sql on installationClosedBenni Mack2018-06-11

Actions
Actions #1

Updated by Benni Mack almost 6 years ago

  • Related to Task #85215: Have EM only evaluate current ext_tables.sql on installation added
Actions #2

Updated by Nicole Cordes almost 6 years ago

  • Status changed from New to Needs Feedback
  • Assignee set to Nicole Cordes

Hi Michael,

A couple of weeks ago the Extension Manager was changed to trigger a complete database update after an extension was activated. If I understand your issue correctly, your problem should be solved by this change. The username is not allowed to be changed to a smaller length because the core defines (and relies) on its larger length.

I think with this change the user does not need to maintain any database action on his/her own anymore.

Furthermore I would not show any message for unused fields/tables. In the context of a global database comparison we are not able to tell if those information are coupled to the installed extension.

Actions #3

Updated by Michael Schams almost 6 years ago

Hi Nicole,

Thanks for looking into this and your feedback.

I will try to play with the new behaviour before 9.4 is out. I am desperately trying to think about a scenario where a BE user should be made aware of a DB change, which has not been applied automatically (no such scenario came to my mind so far).

If someone comes across this ticket after TYPO3 v9.4 was released, pls feel free to close it :-)

Actions #4

Updated by Wouter Wolters over 5 years ago

  • Status changed from Needs Feedback to Closed

We have 9.5LTS already :-), closing the ticket as the author asked us to do so.

Actions

Also available in: Atom PDF