?
avatar sakiss
sakiss
9 Jan 2020

Steps to reproduce the issue

Add an sql file with the name (4.0.0-2020-01-08.sql) under the folder: administrator/components/com_admin/sql/updates/mysql/mysql

Inside that file put an sql update query.

UPDATE `#__users` SET `lastResetTime` = NULL WHERE `lastResetTime` = '0000-00-00 00:00:00';
*This was taken from a previous update script which obviously did not work, hence it's safe for test.

The go to the Joomla Installer > Database, select the "Joomla CMS" item from the list and press the "Update Structure" button.

Expected result

The "Update Structure" is meant to update the database schema and data, based on the sql queries included in the files under the administrator/components/com_admin/sql/updates/mysql/mysql.

Hence the lastResetTime column in the users table should be null, where 0 datetime exist.

Actual result

users_table

System information (as much as possible)

Joomla 4.0beta1-dev

Additional comments

The sql ALTER TABLE queries work fine. Seems like there is an check, comparing the table schema with the elements of those queries and goes on. While it skips the data updates.

avatar sakiss sakiss - open - 9 Jan 2020
avatar joomla-cms-bot joomla-cms-bot - change - 9 Jan 2020
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 9 Jan 2020
avatar sakiss sakiss - change - 9 Jan 2020
The description was changed
avatar sakiss sakiss - edited - 9 Jan 2020
avatar sakiss sakiss - change - 9 Jan 2020
The description was changed
avatar sakiss sakiss - edited - 9 Jan 2020
avatar SharkyKZ
SharkyKZ - comment - 9 Jan 2020

Seems like there is an check, comparing the table schema with the elements of those queries and goes on. While it skips the data updates.

That's exactly what's happening and it's expected behavior.

avatar joomla-cms-bot joomla-cms-bot - change - 9 Jan 2020
Status New Closed
Closed_Date 0000-00-00 00:00:00 2020-01-09 13:46:30
Closed_By joomla-cms-bot
avatar alikon alikon - change - 9 Jan 2020
Closed_By joomla-cms-bot alikon
avatar joomla-cms-bot joomla-cms-bot - close - 9 Jan 2020
avatar joomla-cms-bot
joomla-cms-bot - comment - 9 Jan 2020

Set to "closed" on behalf of @alikon by The JTracker Application at issues.joomla.org/joomla-cms/27452

avatar sakiss
sakiss - comment - 9 Jan 2020

Fine!
Though the sql files are misleading as many of them contain update queries.
Also how can the data change to reflect the schema changes?
For example in the query i mentioned, it previously changed/altered the default value to NULL.

avatar richard67
richard67 - comment - 10 Jan 2020

When the Joomla update is done using the Joomla Update component, the all sql statements update sql file are executed, i.e. also the UPDATE statements. The "Fix" button for structure is only for fixing structure if something goes wrong with the update. The ancient method "copy the Joomla files and then use the database "Fix" button and then discover the extensions is not supported anymore since Joomla 3.5. The corresponding update instructions docs show that in a big red text box, as far as I remember.

avatar sakiss
sakiss - comment - 16 Jan 2020

That clarifies the things.
Thank you!

Add a Comment

Login with GitHub to post a comment