rsion :: <b>2' . $updates_to_version . '</b></p>' ."\n";
//
// Schema updates
//
switch ($row['config_value'])
{
case '':
switch (SQL_LAYER)
{
case 'mysql':
case 'mysql4':
$sql[] = "ALTER TABLE " . USERS_TABLE . " DROP
COLUMN user_autologin_key";
$sql[] = "ALTER TABLE " . RANKS_TABLE . " DROP
COLUMN rank_max";
$sql[] = "ALTER TABLE " . USERS_TABLE . "
ADD COLUMN user_session_time int(11) DEFAULT '0' NOT NULL,
ADD COLUMN user_session_page smallint(5) DEFAULT '0' NOT NULL,
ADD INDEX (user_session_time)";
$sql[] = "ALTER TABLE " . SEARCH_TABLE . "
MODIFY search_id int(11) NOT NULL";
$sql[] = "ALTER TABLE " . TOPICS_TABLE . "
MODIFY topic_moved_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
ADD COLUMN topic_first_post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
ADD INDEX (topic_first_post_id)";
$sql[] = "ALTER TABLE " . THEMES_NAME_TABLE . "
ADD COLUMN tr_class1_name varchar(50) NULL,
ADD COLUMN tr_class2_name varchar(50) NULL,
ADD COLUMN tr_class3_name varchar(50) NULL,
ADD COLUMN th_class1_name varchar(50) NULL,
ADD COLUMN th_class2_name varchar(50) NULL,
ADD COLUMN th_class3_name varchar(50) NULL,
ADD COLUMN td_class1_name varchar(50) NULL,
ADD COLUMN td_class2_name varchar(50) NULL,
ADD COLUMN td_class3_name varchar(50) NULL,
ADD COLUMN span_class1_name varchar(50) NULL,
ADD COLUMN span_class2_name varchar(50) NULL,
ADD COLUMN span_class3_name varchar(50) NULL";
break;
case 'postgresql':
$sql[] = "ALTER TABLE " . USERS_TABLE . "
ADD COLUMN user_session_time int4";
$sql[] = "ALTER TABLE " . USERS_TABLE . "
ADD COLUMN user_session_page int2";
$sql[] = "ALTER TABLE " . USERS_TABLE . "
ALTER COLUMN user_session_time SET DEFAULT '0'";
$sql[] = "ALTER TABLE " . USERS_TABLE . "
ALTER COLUMN user_session_page SET DEFAULT '0'";
$sql[] = "CREATE INDEX user_session_time_" . $table_prefix . "users_index
ON " . USERS_TABLE . " (user_session_time)";
$sql[] = "ALTER TABLE " . TOPICS_TABLE . "
ADD COLUMN topic_first_post_id int4";
$sql[] = "CREATE INDEX topic_first_post_id_" . $table_prefix . "topics_index
ON " . TOPICS_TABLE . " (topic_first_post_id)";
$sql[] = "ALTER TABLE " . THEMES_NAME_TABLE . "
ADD COLUMN tr_class1_name varchar(50) NULL";
$sql[] = "ALTER TABLE " . THEMES_NAME_TABLE . "
ADD COLUMN tr_class2_name varchar(50) NULL";
$sql[] = "ALTER TABLE " . THEMES_NAME_TABLE . "
ADD COLUMN tr_class3_name varchar(50) NULL";
$sql[] = "ALTER TABLE " . THEMES_NAME_TABLE . "
ADD COLUMN th_class1_name varchar(50) NULL";
$sql[] = "ALTER TABLE " . THEMES_NAME_TABLE . "
ADD COLUMN th_class2_name varchar(50) NULL";
$sql[] = "ALTER TABLE " . THEMES_NAME_TABLE . "
ADD COLUMN th_class3_name varchar(50) NULL";
$sql[] = "ALTER TABLE " . THEMES_NAME_TABLE . "
ADD COLUMN td_class1_name varchar(50) NULL";
$sql[] = "ALTER TABLE " . THEMES_NAME_TABLE . "
ADD COLUMN td_class2_name varchar(50) NULL";
$sql[] = "ALTER TABLE " . THEMES_NAME_TABLE . "
ADD COLUMN td_class3_name varchar(50) NULL";
$sql[] = "ALTER TABLE " . THEMES_NAME_TABLE . "
ADD COLUMN span_class1_name varchar(50) NULL";
$sql[] = "ALTER TABLE " . THEMES_NAME_TABLE . "
ADD COLUMN span_class2_name varchar(50) NULL";
$sql[] = "ALTER TABLE " . THEMES_NAME_TABLE . "
ADD COLUMN span_class3_name varchar(50) NULL";
break;
case 'mssql-odbc':
case 'mssql':
$sql[] = "ALTER TABLE " . USERS_TABLE . " DROP
COLUMN user_autologin_key";
$sql[] = "ALTER TABLE " . USERS_TABLE . " ADD
user_session_time int NOT NULL,
user_session_page smallint NOT NULL,
CONSTRAINT [DF_" . $table_prefix . "users_user_session_time] DEFAULT (0) FOR [user_session_time],
CONSTRAINT [DF_" . $table_prefix . "users_user_sessio