View Single Post
Old 17 May 2012, 16:03
DetroitYES's Avatar
DetroitYES DetroitYES is offline
Join Date: Mar 2009
Creating an update for a custom product...

I've got a custom product I've developed, and part of the install code makes a MySQL Procedure and some tables. Naturally, the uninstall code drops all of these additions.

However, I've reached a point where I need to *change* the procedure, and retain all of the tables, and more importantly their data... (Previously, I would just uninstall the product and re install with the updated SQL)

I noticed that the install/uninstall code boxes have a place for version number. Right now I just use * for version number. Can I use this to make an update to the procedure? In other words, how do I make product updates?


--------------- Added 17 May 2012 at 17:53 ---------------

Ah, found it, not sure why I was having such a hard time finding this link...

Install Code
(optional) This PHP code will be run only during installation of or while upgrading your product, starting with code attached to the oldest version. If the user is upgrading, only codes attached to newer versions will be run. Here is an example:

You make several releases of your product, DemoProduct, versions 1.0, 1.1, 2.0, and 2.0.1. A user currently has version 2.0 installed. When he or she upgrades to 2.0.1, the only install code that will be run is code attached to the 2.0.1 release. However, when someone installs your product for the first time, code will be run from all versions in the order of 1.0, 1.1, 2.0, and finally 2.0.1.

This system allows you to provide increment upgrades and first time installs in the same system.

Reply With Quote