Skip to content

[4.0] Fix initial core data and code style in joomla.sql files#28424

Merged
wilsonge merged 8 commits intojoomla:4.0-devfrom
richard67:4.0-dev-fix-initial-core-data-for-postgresql
Mar 24, 2020
Merged

[4.0] Fix initial core data and code style in joomla.sql files#28424
wilsonge merged 8 commits intojoomla:4.0-devfrom
richard67:4.0-dev-fix-initial-core-data-for-postgresql

Conversation

@richard67
Copy link
Copy Markdown
Member

@richard67 richard67 commented Mar 21, 2020

Pull Request for Issue # .

Summary of Changes

This Pull Request changes the joomla.sql files for new installations for both kinds of databases.

MySQL (and MariaDB):

  • Code style: Removed redundant spaces and added missing names quoting and a missing line break.
  • Fixed alphabetical order of extensions inserted for webservices plugins.

PostgreSQL:

Fix unneeded differences in data between PostgreSQL and MySQL and comments style.

The differences between the databases fixed by this PR are:

  • Vote plugin is by default disabled on MySQL, on PostgreSQL it is enabled.
  • On MySQL, the default workflow stages and transitions are inserted with the right asset ID's, on PostgreSQL they are inserted with asset ID zero.
  • On MySQL, the new record in the extensions table for plg_system_webauthn is inserted with order number zero like it is for all the other extensions, on PostgreSQL it is order number 8.
  • The order in which new records for the diverse webservices plugins are inserted into the extensions table differs between the 2 database types.

In the comments for the diverse sections in posgresql/joomla.sql, table names are in most cases quoted like on MySQL, only for a few recently added ones it was done differently. This PR unifies that so a comparison between the two joomla.sql files will not show difference in quotes in these comments.

Finally, fixed alphabetical order of extensions inserted for webservices plugins in the same way as for MySQL.

Testing Instructions

The test consists of 2 parts:

  1. Code review.
  2. Test if new installation still works.

Instructions for part 1 - code review:

  1. Check if the differences shown in the "Files changed" view on GitHub are equal to what is described in the summary of changes above and check that they don't contain any typos or errors.
  2. Using a good comparison tool, e.g. BeyondCompare, Araxis Merge, TotalCommander, ..., compare the two joomla.sql files for MySQL and PostgreSQL. Check for all insert statements that they insert the same data and don't contain any differences which are not expected due to the different database type (like e.g. CURRENT_TIMESTAMP being a function or a session variable, that's expected).

Instructions for part 2 - test new installation:

  1. Apply the patch of this PR to a current, clean 4.0-dev branch or recent nightly. If necessary remove configuration.php and clear database to prepare a new installation.
  2. Make a new installation on whatever kind of database you have available. If you have more than 1, test as many as you feel comfortable with. Verify that the installation works as well as it works without this PR.
  3. Login to backend and check it works as well as it works without this PR.
  4. When reporting back your test result, please note which kind of database you have tested.

Expected result

After a new installation, the initial data inserted with joomla.sql is the same for MySQL and PostgreSQL databases.

Actual result

After a new installation, the initial data inserted with joomla.sql is different between MySQL and PostgreSQL databases. The differences are as described in the summary of changes.

Documentation Changes Required

None.

@richard67 richard67 changed the title [4.0] [WiP] Fix initial core data for PostgreSQL and code style for MySQL in joomla.sql files [4.0] Fix initial core data for PostgreSQL and code style for MySQL in joomla.sql files Mar 21, 2020
@richard67 richard67 marked this pull request as ready for review March 21, 2020 16:38
@alikon
Copy link
Copy Markdown
Contributor

alikon commented Mar 22, 2020

I have tested this item ✅ successfully on 7171556

tested o postgresql
review for mysql/mariadb


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

Fix alphabetical order of extensions records for webservices plugins
@richard67 richard67 changed the title [4.0] Fix initial core data for PostgreSQL and code style for MySQL in joomla.sql files [4.0] Fix initial core data and code style in joomla.sql files Mar 22, 2020
@richard67
Copy link
Copy Markdown
Member Author

@Quy I've decided to follow your suggestion and fix alphabetical order. You are right, it is like that elsewhere, too.

@alikon Sorry for that, but could you test again? Thanks in advance.

@richard67
Copy link
Copy Markdown
Member Author

@Quy Could you check again if all ok now? I hope I haven't missed one.

@Quy
Copy link
Copy Markdown
Contributor

Quy commented Mar 22, 2020

I have tested this item ✅ successfully on 8ae9896

Tested with MySQL.


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

@richard67
Copy link
Copy Markdown
Member Author

@alikon Could you review? Last changes since you've tested were for alphabetical ordering of the records for the webservices plugins in the extensions table, so I think review should be sufficient.

The changes are in these 2 commits:

@chmst
Copy link
Copy Markdown
Contributor

chmst commented Mar 23, 2020

I have tested this item ✅ successfully on 8ae9896

Tested with mySQL


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

@richard67
Copy link
Copy Markdown
Member Author

@alikon Could you test again or review the PostgreSQL part? Thanks in advance.

@alikon
Copy link
Copy Markdown
Contributor

alikon commented Mar 23, 2020

I have tested this item ✅ successfully on 8ae9896

code review


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

@alikon
Copy link
Copy Markdown
Contributor

alikon commented Mar 23, 2020

RTC


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

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Mar 23, 2020
@richard67
Copy link
Copy Markdown
Member Author

Thanks to all testers and reviewers.

@wilsonge wilsonge merged commit 8b6b574 into joomla:4.0-dev Mar 24, 2020
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Mar 24, 2020
@wilsonge
Copy link
Copy Markdown
Contributor

Thanks for spending the time on this @richard67 !

@wilsonge wilsonge added this to the Joomla 4.0 milestone Mar 24, 2020
@richard67 richard67 deleted the 4.0-dev-fix-initial-core-data-for-postgresql branch March 24, 2020 12:29
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.

6 participants