Skip to content
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

Fix database error after new installation of current staging #25299

Merged

Conversation

richard67
Copy link
Member

@richard67 richard67 commented Jun 23, 2019

Pull Request for Issue #25293 .

Summary of Changes

This PR fixes 2 problems coming from PR #24595 :

  1. The database schema checker can't handle removing and adding back an index with the same name. Since that index was not useful anyway, this PR changes the schema updates from PR [SQL] fix field home of #__template_styles table #24595 and the installation joomla.sql so this index is not added back, but 2 useful indexes are added istead. For details on these changes see Database error after new installation of current staging #25293 (comment).
  2. This PR also fixes the typo ALTER TABLE "#__template_style" instead of ALTER TABLE "#__template_styles" in the schema update from PR [SQL] fix field home of #__template_styles table #24595 for postgresql.

Testing Instructions

  1. Install current staging and check database view in backend. Result: See section "Actual result" below.
  2. Use "fix" button: Result: does not help. You will end in a toggling of database error "inxed should exist" and "index should not exist" with every click on the "fix" button.
  3. Apply patch of this PR e.g. with Patchtester component.
  4. Refresh database view. Result three errors: 1. index idx_home should not exist, 2. idx_client_id should exist, and 3. idx_client_id_home should exist.
  5. Use "fix" button. Result: See section "Expected result" below.
  6. Remove configuration.php and clear database content e.g. with MyPhpAdmin and repeat clean installation. Result: See section "Expected result" below.

For Postgresql the number of errors shown in step 4 and for the actual result is different because of the typo in the schema update for postgresql without this PR, but at the end the result will be the same: Fix button in step 5 fixes it, and after new install with this PR applied there are no errors.

Expected result

No database errors.

Actual result

1 error: Table 'xyz_template_styles' should not have index 'idx_home'. (From file 3.9.8-2019-06-15.sql.)

Documentation Changes Required

None.

@richard67
Copy link
Member Author

Appveyor failure seems not to be related to this PR.

@richard67
Copy link
Member Author

@alikon Please test as soon as you find time. Check also the links in #25293 (comment) for my changes on the indexes.

@richard67
Copy link
Member Author

@HLeithner I think this is a release blocker.

@ghost ghost added the Release Blocker label Jun 24, 2019
@richard67
Copy link
Member Author

@franz-wohlkoenig Thanks.

@Quy
Copy link
Contributor

Quy commented Jun 24, 2019

I have tested this item ✅ successfully on c21850b

Tested MySQL.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/25299.

@alikon
Copy link
Contributor

alikon commented Jun 24, 2019

I have tested this item ✅ successfully on c21850b

on postgresql


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/25299.

@richard67
Copy link
Member Author

@Quy Thanks for testing. Could you add the RTC label? Nicola doesn't have that privilege anymore.

@ghost ghost removed the Release Blocker label Jun 24, 2019
@ghost
Copy link

ghost commented Jun 24, 2019

Status "Ready To Commit".

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Jun 24, 2019
@richard67
Copy link
Member Author

Thanks

@HLeithner
Copy link
Member

thx

@HLeithner HLeithner merged commit 0fface7 into joomla:staging Jun 25, 2019
@HLeithner HLeithner added this to the Joomla 3.9.9 milestone Jun 25, 2019
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Jun 25, 2019
@richard67
Copy link
Member Author

Thanks

@richard67 richard67 deleted the fix-schema-updates-3.9.8-2019-06-15 branch June 25, 2019 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants