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

Make new update migrations available for plugin install and uninstall #10069

Open
tsteur opened this issue Apr 18, 2016 · 0 comments
Open

Make new update migrations available for plugin install and uninstall #10069

tsteur opened this issue Apr 18, 2016 · 0 comments
Labels
c: Platform For Matomo platform changes that aren't impacting any of our APIs but improve the core itself. Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.

Comments

@tsteur
Copy link
Member

tsteur commented Apr 18, 2016

In Piwik 3.0.0-b1 we introduced a better way to define plugin updates by using migrations to define MySQL schema updates. It would be nice to have these available as well in Plugin::install and Plugin::uninstall. Otherwise we still need to write plain SQL there see https://github.com/piwik/piwik/pull/10003/files where we can see plain SQL and usage of the migration API.

I first thought about removing install completely and only using updates in the future but it is actually good to keep install:

  • There would be still an uninstall needed in the plugin anyway so it's kind of logical to have an install
  • Plugin installation will be faster as we won't have to reply all existing updates but can directly install the plugin. Imagine it is a plugin that adds new columns to log_visit and changes it's type multiple times in a couple of its updates. Instead we can directly install the correct column with the correct type.
  • It is easy to get an overview of what the plugin's schema should look like. By looking over many update files it is hard to picture what the actual schema should look like.
@tsteur tsteur added Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. c: Platform For Matomo platform changes that aren't impacting any of our APIs but improve the core itself. labels Apr 18, 2016
@mattab mattab added this to the 3.0.0 milestone Jul 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: Platform For Matomo platform changes that aren't impacting any of our APIs but improve the core itself. Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.
Projects
None yet
Development

No branches or pull requests

2 participants