Skip to content

Installer

Jason Pell edited this page Jun 21, 2013 · 1 revision

Installer Plugins

Installer plugins are for performing upgrades to OpenDb database only. Are not to be used for a new install, which is a SQL script: ./install/new/opendb.sql

The php classes will be located in: ./install/upgrade/

Subdirectories off this directory will contain the sql scripts:

  • ./install/upgrade/0.81
  • ./install/upgrade/0.80
  • ./install/upgrade/0.60_0.80 (upgrade from 0.60 to 0.80)

The version specified will indicate what version range the scripts are for.

If an upgrade consists of a SQL script only, then there is no need for a PHP class.

The process the install script will use to determine what upgrade options is:

  • Get a list of all subdirectories off of ./install/upgrade/
  • Check for matching PHP script in ./install/upgrade of the format: Upgrader_XXX.class.php

Where there are additional php classes and no matching SQL subdirectory, it is assumed that the upgrade does not include any SQL scripts and it will be provided as an upgrade option as well.

Sample Plugin

 class Upgrader_100_110 extends OpenDbUpgrader
 {
 	function Upgrader_100_110()
 	{
 		parent::OpenDbUpgrader(
 					'1.0', 
 					'1.10', 
 					array(
 						array(description=>'Upgrade database')
 					)
 				);
 	}
 }

The wiki migration is a work in progress. I am aware that some images don't currently work.

Clone this wiki locally