Форуми / Cotonti / Extensions / updating siena plugins

Dyllon
#1 10.03.2011 16:39

My question is: when writing a plugin for siena, you have plugin.install.sql, and plugin.uninstall.sql. is there a way that you can have sql files allocated for each version change? example:

in plugin.setup.php i have :

Version=1.0

if i make changes to the sql file, and i change it to

Version=1.1

rather than uninstalling the plugin and losing everything, is it possible to have a seperate sql file ran when the user clicks update?

We are what we repeatedly do. Excellence then, is not an act, but a habit.
Trustmaster
#2 10.03.2011 17:02

Patch files are supported, file name format is:

  • sql_1.1.sql (for SQL patches, where 1.1 is new version number)
  • php_1.1.inc (for PHP patches)
May the Source be with you!
Dyllon
#3 10.03.2011 17:17

fantastic! thank you.

Added 1 days later:

another question, say if it was upgraded again (1.2), although someone still has 1.0 installed.. will it run both sql files in consequent order?

We are what we repeatedly do. Excellence then, is not an act, but a habit.

Відредаговано: Dyllon (12.03.2011 04:55, 13 років тому)
Trustmaster
#4 13.03.2011 18:58

Yes, it will apply all patches between installed and latest version in their version order.

May the Source be with you!