Addon Schema migrations

megabosx

Active member
I would like to add extra fields to a table my addon creates without having to uninstall and install the addon, how can this be done through the update addon mechanism, i have already added the new fields to the install function but this doesn't seem to alter the table.
 
The existing version ID is passed into your install code. You would use that to detect whether it's a new install or an upgrade and take steps based on that to make the necessary changes. You can see that in both the Resource Manager and Media Gallery install scripts.
 
Top Bottom