[5.0] Add missing "/** CAN FAIL **/" to update SQL scripts from PR #38149 #41184
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request for #38149 (comment) .
Summary of Changes
With PR #38149 , update SQL scripts have been added, which add a new column to a table.
However, the corresponding SQL statement is missing the
/** CAN FAIL **/installer hint, which has been implemented once with PR #36506 and established with PR #37156 for allALTER TABLE ... ADD COLUMNstatements.The use of this installer hint is to ignore the SQL error which happens when the statement runs and the column already exists because MySQL and PostgreSQL do not support an
IF NOT EXISTSin such an SQL statement. This can happen e.g. when an update breaks for some reason after the SQL statement has run but the schema version has not been updated in the database, so then trying to resume the broken update the statement will run again.Testing Instructions
Code review. See e.g. following places for examples how
/** CAN FAIL **/is used:https://github.com/joomla/joomla-cms/blob/4.4-dev/administrator/components/com_admin/sql/updates/mysql/4.3.2-2023-05-20.sql
https://github.com/joomla/joomla-cms/blob/4.4-dev/administrator/components/com_admin/sql/updates/postgresql/4.3.2-2023-05-20.sql
Actual result BEFORE applying this Pull Request
Installer hint
/** CAN FAIL **/is missing.Expected result AFTER applying this Pull Request
Installer hint
/** CAN FAIL **/is present.Link to documentations
Please select:
No documentation changes for docs.joomla.org needed
No documentation changes for manual.joomla.org needed