From: Janusz Dobrowolski Date: Fri, 4 Dec 2009 23:30:33 +0000 (+0000) Subject: Upgrade skeleton files for 2.3 release. X-Git-Tag: v2.4.2~19^2~1010 X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=860d936f5821e3ffc5f0b63735365576419e5847;p=fa-stable.git Upgrade skeleton files for 2.3 release. --- diff --git a/sql/alter2.3.php b/sql/alter2.3.php new file mode 100644 index 00000000..07e84e44 --- /dev/null +++ b/sql/alter2.3.php @@ -0,0 +1,53 @@ +. +***********************************************************************/ + +class fa2_3 { + var $version = '2.3'; // version installed + var $description; + var $sql = 'alter2.3.sql'; + var $preconf = true; + + function fa2_3() { + $this->description = _('Upgrade from version 2.2 to 2.3'); + } + + // + // Install procedure. All additional changes + // not included in sql file should go here. + // + function install($pref, $force) + { + return true; + } + // + // Checking before install + // + function pre_check($pref, $force) + { + return true; + } + // + // Test if patch was applied before. + // + function installed($pref) { + $n = 1; // number of patches to be installed + $patchcnt = 0; + + if (!check_table($pref, 'comments', 'type', array('Key'=>'MUL'))) $patchcnt++; + + $n -= $patchcnt; + return $n == 0 ? true : $patchcnt; + } +}; + +$install = new fa2_3; +?> \ No newline at end of file diff --git a/sql/alter2.3.sql b/sql/alter2.3.sql new file mode 100644 index 00000000..8e9256c5 --- /dev/null +++ b/sql/alter2.3.sql @@ -0,0 +1 @@ +ALTER TABLE 0_comments ADD KEY type_and_id (`type`, `id`); \ No newline at end of file