upgrade script ignores failing
While testing some index setups for faster updates I made mistakes leading to an error during the update. But the upgrade script just ignored that there were errors and completed with "Update successful". After fixing the error I couldn't update anymore, as even the version number was changed to the new version.
The behavior should be: If an error is occurring during update, the update must be failing. The version number may not be updated until the update is successful. Best error handling: The update changes should be reverted, if possible.
Console output from the update
php upgrade.php Turned on maintenance mode Failed to update database structure (MDB2 Error: unknown error, _doQuery: [Error message: Could not execute statement] [Last executed query: CREATE INDEX
properties_userid_path_name_indexONoc_properties(userid,propertypath,propertyname)] [Native code: 1071] [Native message: Specified key was too long; max key length is 1000 bytes] ) Turned off maintenance mode Update successful
System infos: debian, mysql Update from 5.0.9 to 5.0.11
@karlitschek something to take care about for oc6 as well
@ringmaster Can you have a look here please?
@ringmaster What do you think?
Were the errors during update caused by changes made in the database that were done by a user? I'm not sure ownCloud should account for that expectation.
Otherwise, is the intent to allow the ownCloud upgrade to roll back if it fails to execute?
I’m closing this issue because it has been inactive for a few months. This probably means that the issue is not reproducible or it has been fixed in a newer version.
Please reopen if you still encounter this issue with the latest stable version and then please use the issue template. You an also contribute directly by providing a patch – see the developer manual. :)
Thank you!