@mgazdzik opened this Issue on November 11th 2014 Contributor

Currently migrations are carried out by running core:update command.
However it maybe should also be possible to split updates into two flows. One should be db migration and other would be to perform some additional logic.

Possible use case:

  • Piwik admin wants to update his instance with separate DB server,
  • does --dry-run (or simply run core:update as in next versions --dry-run will be deprecated) to see what queries need to be executed
  • executes queries manually on database
  • wants to perform other logic done 'under the hood' (i.e. plugins name change, plugin activation etc) - but currently this is impossible, as Piwik update will notice core_version in piwik_option table set to latest possible, and will omit all the logic that hasn't been executed.

It could come quite in handy when some users have setup, on which running core:update will not be a good idea.

Goal of this ticket is to start discussion about possible improvements and separating DB migrations from additional logic done between some versions.

@tsteur commented on November 11th 2014 Owner

refs #5985

@mattab commented on December 1st 2014 Owner

Hi @mgazdzik Updater dry-run: do not show the SQL query to update core_version or $plugin_version was fixed in #6760

I think this change should help as a start.

Another good idea could be:

  • Remember which SQL query was executed and do not execute it again
@quba commented on December 1st 2014 Contributor

Remember which SQL query was executed and do not execute it again

Yes, but only in case query was executed without errors (possible on bigger databases).

@mattab commented on March 24th 2015 Owner

wants to perform other logic done 'under the hood' (i.e. plugins name change, plugin activation etc) - but currently this is impossible, as Piwik update will notice core_version in piwik_option table set to latest possible, and will omit all the logic that hasn't been executed.

This was fixed in #6760 by hiding the core_version SQL from the list of queries.
So now even when copy pasting the list of queries it will still show the update screen to run any non-sql upgrades.

@mattab commented on March 24th 2015 Owner

What would be the most useful next step for improving the core:update experience, if something needs to be done soon? otherwise I leave the issue opened for further suggestion and feedback!

@mattab commented on September 18th 2017 Owner
This Issue was closed on September 18th 2017
Powered by GitHub Issue Mirror