<?php // $Revision: 1.8 $
/* vim: set expandtab ts=4 sw=4 sts=4: */
/**
* $Id: upgrade_db.php,v 1.8 2003/10/28 22:46:26 madbear Exp $
*
* Copyright (c) 2003 by the NetOffice developers
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
require_once('./db_var.inc.php');
// update from 2.5.0 to 2.5.2
if (version_compare($version, '2.5.2', '<')) {
$SQL[] = <<<STAMP
DROP TABLE IF EXISTS `{$tablePrefix}sessions`
STAMP;
$SQL[] = <<<STAMP
CREATE TABLE `{$tablePrefix}sessions` (
id $db_varchar32[$databaseType],
ipaddr $db_varchar16b[$databaseType],
session_data $db_longtext[$databaseType],
last_access $db_int[$databaseType],
PRIMARY KEY (id, ipaddr),
KEY (last_access)
)
STAMP;
}
// update from 2.5.2
if (version_compare($version, '2.5.2', '<=')) {
$SQL[] = <<<STAMP
UPDATE `{$tablePrefix}members` SET last_page='' WHERE 1
STAMP;
}
?>