Inform BE user, if extension installation possibly requires DB updates
#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 "
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.
#2 Updated by Nicole Cordes 8 months ago
- Status changed from New to Needs Feedback
- Assignee set to Nicole Cordes
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.
#3 Updated by Michael Schams 8 months ago
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 :-)