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

Ignore table not found errors when removing plugin or measurable settings #11881

Merged
merged 1 commit into from Aug 3, 2017

Conversation

sgiehl
Copy link
Member

@sgiehl sgiehl commented Jul 19, 2017

As described in #11067, it might happen the plugin or measurable settings might not have been created when updating from an old version.

Ignoring those table not found errors seems to be the simplest solution, as there is no need to remove anything if the table doesn't exist at all

fixes #11067

@sgiehl sgiehl added the Needs Review PRs that need a code review label Jul 19, 2017
@sgiehl sgiehl added this to the 3.0.5 milestone Jul 19, 2017
@sgiehl sgiehl requested a review from mattab July 19, 2017 17:46
@mattab
Copy link
Member

mattab commented Jul 24, 2017

@sgiehl there is also another query using this table,

$sql  = "INSERT INTO $table (`idsite`, `plugin_name`, `setting_name`, `setting_value`) VALUES (?, ?, ?, ?)";

Could we apply the patch there as well?

@sgiehl
Copy link
Member Author

sgiehl commented Jul 24, 2017

We could add it. But actually while updating there shouldn't be any settings added before the table was created.

@sgiehl
Copy link
Member Author

sgiehl commented Jul 24, 2017

@mattab I wouldn't add the ignore to the inserts. Removing something that doesn't exist is imho no real "failure", but not adding something that should be added is a failure and should be reported as one.

@mattab mattab merged commit 2437ced into 3.x-dev Aug 3, 2017
@mattab
Copy link
Member

mattab commented Aug 3, 2017

👍

@mattab mattab deleted the issue_11067 branch August 3, 2017 05:13
@mattab mattab added the not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. label Sep 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review PRs that need a code review not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

error piwik_plugin_setting' doesn't exist after upgrade to v3
2 participants