User tests: Successful: Unsuccessful:
Pull Request for Issue # .
With PR #33550 , com_csp war removed from the 4.0-dev branch, an update SQL 4.0.0-2021-05-04.sql was provided to remove the #__csp table from database when updating to the next J4 version, and the statement to create that table was removed from the old update SQL 4.0.0-2018-06-03.sql.
The last change causes an SQL error when updating from 3.10 because that table doesn't exist.
This this pull request (PR) fixes that by adding " IF NOT EXISTS" to the "DROP TABLE" statement in the SQL update script mentioned above.
Furthermore, this PR corrects the wrong names quoting in the 4.0.0-2021-05-04.sql file for PostgreSQL from PR #33550 . No idea how I could miss that on review.
This PR needs to be tested with both types of databases, MySQL (or MariaDB) and PostgreSQL.
Testers please report back which type you have used.
If you can test with both, please do that.
Update a 3.10 to the latest nightly build, with debug system on and error reporting set to maximum.
For reproducing the issue, use the regular nightly build custom update URL or package, for testing the fix from this PR use the custom update URL or package created by drone for this PR.
At the end of the update, check if errors are shown in backend or your PHP error log.
After the update has finished, check in file administrator/logs/joomla_update.php which SQL statements was executed as last for that update.
You get an SQL error:
Unknown table `xyz.#__csp`
with "xyz" being the database name, and "#__" being the table prefix.
The last SQL statement logged in administrator/logs/joomla_update.php is:
Ran query from file 4.0.0-2021-05-04. Query text: DELETE FROM `#__extensions` WHERE `name` = 'com_csp' and `type` = 'component' an.
You get an SQL error:
syntax error at or near "`" LINE 1: DELETE FROM `#__extensions` WHERE `name` = 'com_csp' and ...
with "#__" being the table prefix.
The last SQL statement logged in administrator/logs/joomla_update.php is:
Ran query from file 4.0.0-2021-05-01. Query text: UPDATE "#__template_styles" SET "params" = '{"hue":"hsl(214, 63%, 20%)","bg-l.
No SQL error.
The last SQL statement logged in administrator/logs/joomla_update.php is:
Ran query from file 4.0.0-2021-05-07. Query text: UPDATE `#__mail_templates` SET `subject` = 'COM_PRIVACY_EMAIL_DATA_EXPORT_COM.
(On PostgreSQL of course with the right names quoting.)
None.
| Status | New | ⇒ | Pending |
| Category | ⇒ | SQL Administration com_admin Postgresql |
| Title |
|
||||||
| Labels |
Added:
?
?
|
||
| Title |
|
||||||
| Title |
|
||||||
What database does not support it? On a quick look there seem to be support on mysql/mariadb & PostgreSQL? Or do i miss something?
@zero-24 Maybe not, but I'm also not sure now if the schema checker supports it. With this PR here now I'm sure it works.
But I will check and maybe improve.
| Labels |
Added:
?
Removed: ? |
||
I have tested this item
10.4.14-MariaDB
Joomla_3.10.0-alpha6 update to Joomla_4.0.0-beta8
Before:
#__extensions WHERE name = 'com_csp' and type = 'component' an.After:
#__mail_templates SET subject = 'COM_PRIVACY_EMAIL_DATA_EXPORT_COM.I have tested this item
| Status | Pending | ⇒ | Ready to Commit |
RTC
| Status | Ready to Commit | ⇒ | Fixed in Code Base |
| Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-05-12 20:05:22 |
| Closed_By | ⇒ | Quy | |
| Labels |
Added:
?
?
Removed: ? |
||
Thanks!
Thanks all!
What database does not support it? On a quick look there seem to be support on mysql/mariadb & PostgreSQL? Or do i miss something?