User tests: Successful: Unsuccessful:
Pull Request for Issue #25482 .
Change back data type of column home
to string (type depending on db type) in table #__template_styles
, because it can not only hold values '0' or '1' but also language code, e.g. 'de-DE', if the template style is a default for a particular language.
This is an undo of PR #24595 .
4 different tests.
Update Joomla 3.9.8 site to a patched 3.9.9 package with this PR and the version number patched to 3.10. PLEASE DO THIS ONLY ON TESTING SITE, NOT ON LIFE SITE.
You can find such a package here:
https://test5.richard-fath.de/Joomla_3.9.10-dev-Update_Package_pr-25484.zip.
Do the same with a 3.9.9: Update it to my patched package.
On a 3.9.8, apply this PR e.g. with patch tester, then go to "Extensions -> Manage -> Database". Use the "Fix" button to apply the changes in the new schema updates from this PR.
Do the same as in step 3 but on a 3.9.9
In all cases the update or schema fix succeeds, and issue #25482 is solved.
See issue #25482 .
None.
Status | New | ⇒ | Pending |
Category | ⇒ | SQL Administration com_admin Postgresql MS SQL |
Labels |
Added:
?
|
Attention, PR is not ready yet, changes in joomla.sql are missing. But you can already apply the PR and run the DB fixer for testing the schema updates are working.
It's a bug if it's missing this critical of a feature
(And yeah, I realize fixing the database code is a lot more effort than it's sometimes worth, but still have to make it known I hate hacky fixes to work around a deeper underlying problem)
ALTER TABLE #__template_styles
DROP INDEX idx_client_id_home
; may fail because the index doesn't exists on direct update
Category | SQL Administration com_admin Postgresql MS SQL | ⇒ | SQL Administration com_admin Postgresql MS SQL Installation |
@HLeithner Not sure. For postgres I have used "IF EXISTS", that should be ok. For the other DB types we don't have that yet. I have to check that.
Hint for testers: Link to modified update package in description has changed, package has been updated by latest changes on this PR.
@HLeithner Not sure. For postgres I have used "IF EXISTS", that should be ok. For the other DB types we don't have that yet. I have to check that.
Something like this for MySQL can help?
(only some new versions of mysql like MariaDB supports IF EXIST for indexes)
SET @idxexist := (SELECT COUNT(*) FROM information_schema.statistics WHERE table_name = '#__template_styles' AND index_name = 'idx_client_id_home' AND table_schema = database());
SET @sqlrmidx:= if( @idxexist > 0, 'SELECT ''INFO: Index already exists.''', 'ALTER TABLE #__template_styles DROP INDEX idx_client_id_home');
PREPARE rmidx FROM @sqlrmidx;
EXECUTE rmidx;
@alikon @twister65 Can you test this PR for postgres? I gotta go sleep now.
I have tested this item
On a mariadb setup this worked for me on the downloads.joomla.org backup I have (which experienced this issue) going from both 3.9.8 backup to this proposed 3.9.10 directly and also going from 3.9.8 to 3.9.9 and then to the proposed 3.9.10. In both cases the schema checker also didn't show any issues.
I have tested this item
This corrects the issue here with mysqli
I have tested this item
This corrects the issue here with mysqli
Status | Pending | ⇒ | Ready to Commit |
Status "Ready To Commit".
Status | Ready to Commit | ⇒ | Pending |
i know, but cannot help today more than this ...
https://docs.joomla.org/Tables/template_styles i've updated this page to state it's a varchar and noted the type of the database
@alikon are you able to at least test it with the index's applied to that table rather than just with the table structure? I installed postgres with brew last night onto my macbook but didn't get time to set up a full joomla install - and won't be able to until tonight
I tested all postgresql scenarios with postgresql 9.6 and worked now.
thx richard
Status | Pending | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2019-07-10 14:47:25 |
Closed_By | ⇒ | HLeithner |
For the record, the fact you have to rename the index is exactly why the bug in the schema parser needs to be fixed. You should not have to version suffix table indexes.