$ /sql/alter2.1.php
/sql/alter2.2.php
/sql/alter2.2rc.sql (new)
+ /admin/inst_upgrade.php
20-Oct-2009 Janusz Dobrowolski
! Conditional config files generation - prevents overwrite during upgrade.
global $path_to_root, $installers;
$inst = $installers[$index];
- $sql = $inst->sql;
$pref = $conn['tbpref'];
$ret = true;
if (!$state || $force)
{
if (!$inst->pre_check($pref)) return false;
+ $sql = $inst->sql;
if ($sql != '')
$ret &= db_import($path_to_root.'/sql/'.$sql, $conn, $force);
***********************************************************************/
class fa2_1 {
var $version = '2.1'; // version installed
- var $description = _('Upgrade from version 2.0 to 2.1');
+ var $description;
var $sql = 'alter2.1.sql';
+
+ function fa2_1() {
+ $this->description = _('Upgrade from version 2.0 to 2.1');
+ }
//
// Install procedure. All additional changes
// not included in sql file should go here.
class fa2_2 {
var $version = '2.2'; // version installed
- var $description = _('Upgrade from version 2.1/2.2beta to 2.2');
+ var $description;
var $sql = 'alter2.2.sql';
var $preconf = true;
var $beta = false; // upgrade from 2.1 or 2.2beta; set in pre_check
function fa2_2() {
-
+ global $security_groups;
+ $this->beta = !isset($security_groups);
+ $this->description = _('Upgrade from version 2.1/2.2beta to 2.2');
$this->preconf = fix_extensions();
}
{
global $security_groups;
- $this->beta = !isset($security_groups);
if ($this->beta && !$force)
$this->sql = 'alter2.2rc.sql';
return $this->beta || !check_table($pref, 'usersonline');
# Patch for upgrade from 2.2beta to 2.2RC/final
-ALTER TABLE `0_tag_associations` DROP PRIMARY KEY;
ALTER TABLE `0_tag_associations` DROP COLUMN `id`;
-ALTER TABLE `0_tag_associations` ADD UNIQUE KEY (`type`,`name`);
+ALTER TABLE `0_tag_associations` ADD UNIQUE KEY(`record_id`,`tag_id`);
DROP TABLE IF EXISTS `0_useronline` ;