[PostgreSQL] Extension reinstall/update duplicate issue in database with PostgreSQL#19402
Conversation
…base with PostgreSQL
Contributor
|
see #18416 |
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
If I install a module and again I update this module with Extensions: Install, It's making a duplicate entry every time in
#__extensionsand#__modulestable.Where is the issue?
The issue is in the database query. Currently, the query is something like that, which one will fail to get current extension_id.
SELECT "extension_id" FROM "#__extensions" WHERE element = 'mod_sample' AND type = 'Module'But it should be
SELECT "extension_id" FROM "#__extensions" WHERE element = 'mod_sample' AND type = 'module'Summary of Changes
I have changed
$this->extension->typetostrtolower($this->extension->type)and$this->typetostrtolower($this->type)in all installer adapters.Testing Instructions
Create a sample module and install it 2 or 3 times with Extensions: Install in Joomla! 3.8.3 and PostgreSQL v10.1. Now see the database
#__extensionsand#__modulestable, you will find the duplicate entry of your sample module.