User tests: Successful: Unsuccessful:
Pull Request (PR) for new issue.
Fix no. 1
See fix no. 2 of PR #26216 .
The database schema checker/fixer does not understand ALTER TABLE
which handle multiple changes, separated by comma. This is valid SQL of course, but not supported by the database schema checker/fixer. If we are lucky it checks the first statement, if we are unlucky it can result in an SQL syntax error, or the statements is not checked, depending if some spaces before and after these commas or not. For the checker/fixer there has to be one single ALTER TABLE
statement for each change.
Fix no. 2
In the same update SQL script postgresql/4.0.0-2018-07-29.sql
, type char(7)
or varchar(7)
is used, where it should be character varying(7)
. I don't remember now the other PR where we found out that this has to be used instead of varchar(7)
in schema updates in ALTER TABLE
statements due to restrictions of the schema checker/fixer. (In CREATE TABLE
it is ok to use varchar(7)
in update SQL scripts.)
The same problem exists in update SQL script postgresql/4.0.0-2019-05-20.sql
for the #__extensions
table. No idea why the database schema checker did not report this, but it is safer to change it also here.
Fix no. 3
Another update SQL script postgresql/4.0.0-2019-08-03.sql
has MySQL names quoting. This is also fixed by this PR.
General remark on changing the SQL update script
Since we are not in beta yet and so don't have to support updates from 4.0-Alpha-x to 4.0-Alpha-y or between nightly builds, we can change the existing 4.0 update scripts (but of course not pre-4.0 scripts). Later when in beta this will not be allowed anymore, so now is a good time to fix it.
Either code review, or test as follows, or both.
Install clean 4.0-dev using a PostgreSQL database.
Go to administrator/index.php?option=com_installer&view=database
.
Result: See section "Actual result" below.
Apply patch.
Realod page administrator/index.php?option=com_installer&view=database
.
Result: See section "Expected result" below.
No database errors shown.
Database errors shown for some com_finder tables and for table #__update_sites
.
None.
Status | New | ⇒ | Pending |
Category | ⇒ | Postgresql SQL Administration com_admin |
Title |
|
Labels |
Added:
?
|
Title |
|
PR is ready.
I have tested this item
Status | Pending | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2019-09-09 10:51:34 |
Closed_By | ⇒ | wilsonge |
Thanks!
Thanks, too.
@wilsonge @Hackwar Please review. I don't have the privilege to request reviews, it seems.
@franz-wohlkoenig Maybe you can add a review reqiest here, too, like with PR #26216 ? Thanks in advance.