-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[4.0] Fix Upgrade with postgresql- From Joomla v3.9.x to v4.0 #25507
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@richard67 and @alikon , please test. |
|
I have tested this item ✅ successfully on a37567f This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/25507. |
|
@twister65 Maybe these sql statements should be extended in both mysql and postgresql to handle also template styles where the value for column |
|
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. |
|
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). |
Ping @wilsonge |
|
@wilsonge Any idea how we will handle switching from native PostgreSQL driver in 3.9.x or 3.10.x to the PostgreSQL PDO driver when updating to 4.0.x? |
|
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? |
|
But I don't think it is called during the upgrade. |
|
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 |
Yes, otherwise the upgrade would have failed. |
|
Agree. |
|
Please, review / test this PR #25729 . |
Pull Request for Issue #25467.
Summary of Changes
Use right data type of template styles home column in db.
Synchronize PR #25477 with PR #25484.
Testing Instructions
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
Expected result
Actual result
Documentation Changes Required