User tests: Successful: Unsuccessful:
Pull Request for Issue #25467.
Use right data type of template styles home column in db.
Synchronize PR #25477 with PR #25484.
Install a copy of Joomla 3.9.10 on postgres.
Apply this PR to your joomla source directory.
Build an update package to your joomla-4.0-dev source directory:
git tag 4.0.0-alpha11-dev
php build/build.php
Update Joomla 3.9.10 with the new update package.
Check if Joomla upgrades successfully
Status | New | ⇒ | Pending |
Category | ⇒ | Postgresql SQL Administration com_admin |
I have tested this item
Code review. Is obvious.
@twister65 Maybe these sql statements should be extended in both mysql and postgresql to handle also template styles where the value for column home
is not '0' or '1' but a language code, e.g. 'de-DE', 'en-GB', ...
I think that could be subject of another, future PR, so I gave this one here a good test.
But if you wanna do it in this one I can text again tomorrow evening.
Hmm, I just see that could become too complicated maybe.
@twister65 Maybe you should change title and description of this PR, because you don't change data type of a database column, you only use right data type in the schema update for inserting the data into that table. Other stuff (data type) is still correct in 4.0-dev because mistake from staging was not merged to 40.0-dev yet.
Title |
|
Sorry for the mistake, I did not anticipate your PR @richard67 .
There is also another issue. When you select PostgreSQL (native) in Joomla 3.9.x and upgrade to Joomla 4.x, the database type is not recognized because Joomla 4.x only supports PostgreSQL (PDO).
In Global Configuration -> Server -> Database Type, MySQL (PDO) is displayed instead of PostgreSQL (PDO). And in the configuration file, $dbtype is 'postgresql', instead of 'pgsql'.
We must force the database type to PGSQL during the upgrade.
Labels |
Added:
?
|
Status | Pending | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2019-07-22 16:40:03 |
Closed_By | ⇒ | wilsonge |
Sorry I thought I'd already merged this!
I can't really remember now but i think the intention is to make people do this in Joomla 3.x (obviously we have the upgraded Joomla Upgrade Component in the 3.10 branch). Because obviously we have the same issue for the people currently on the mysql driver. That's the reason we backported the postgresql pdo driver into 3.x
Thanks for testing guys and for the PR!
Perhaps, we can add a test here:
This is done here:
joomla-cms/libraries/src/Service/Provider/Database.php
Lines 74 to 82 in ba2c285
Now as you posted, I remember having seen that, too, recently. But why has that not worked when you tested? Or has it worked, and I missunderstood your comment above?
Maybe the same thing should be added to the postflight method of administrator/components/com_admin/script.php?
Or is postflight too late?
What do you mean by during the upgrade :)
Upgrade: from Joomla v3.9.x to v4.x.
And during? ;-)
I mean when we download the previous patch then we're still on the old db driver. As soon as you've unzipped the files and done the file cleanup (all part of the 0-100 status bar) and the page reloads then you should be using that database.php file from the DIC. As JFactory will have been overwritten with the new file and we'll be using the Joomla Framework DB Driver v2
As JFactory will have been overwritten with the new file and we'll be using the Joomla Framework DB Driver v2
Yes, otherwise the upgrade would have failed.
But $dbtype
is not correct in the configuration file. I think we need to solve this problem.
Agree.
@richard67 and @alikon , please test.