diff --git a/lib/db/mysql.php b/lib/db/mysql.php index e730ad83237..34c2da91ca8 100644 --- a/lib/db/mysql.php +++ b/lib/db/mysql.php @@ -1366,6 +1366,10 @@ function main_upgrade($oldversion=0) { $result = table_column('event', '', 'repeatid', 'int', '10', 'unsigned', '0', 'not null', 'userid') && $result; } + if ($oldversion < 2005042400) { // Add user tracking prefs field. + table_column('user', '', 'trackforums', 'int', '4', 'unsigned', '1', 'not null', 'autosubscribe'); + } + return $result; } diff --git a/lib/db/postgres7.php b/lib/db/postgres7.php index 9a1c6557ff5..a4d9d46298e 100644 --- a/lib/db/postgres7.php +++ b/lib/db/postgres7.php @@ -1082,6 +1082,10 @@ function main_upgrade($oldversion=0) { $result = table_column('event', '', 'repeatid', 'int', '10', 'unsigned', '0', 'not null', 'userid') && $result; } + if ($oldversion < 2005042400) { // Add user tracking prefs field. + table_column('user', '', 'trackforums', 'int', '4', 'unsigned', '1', 'not null', 'autosubscribe'); + } + return $result; } diff --git a/mod/forum/db/mysql.php b/mod/forum/db/mysql.php index d77d97f6767..35dd8f0cd8d 100644 --- a/mod/forum/db/mysql.php +++ b/mod/forum/db/mysql.php @@ -201,10 +201,6 @@ function forum_upgrade($oldversion) { ) COMMENT=\'Tracks each users untracked forums.\';'); } - if ($oldversion < 2005042301) { // Add user tracking prefs field. - modify_database('','ALTER TABLE prefix_user ADD - `trackforums` TINYINT( 1 ) UNSIGNED DEFAULT \'1\' NOT NULL AFTER `autosubscribe` ;'); - } return true; diff --git a/mod/forum/db/postgres7.php b/mod/forum/db/postgres7.php index c772fe84847..c685d91208c 100644 --- a/mod/forum/db/postgres7.php +++ b/mod/forum/db/postgres7.php @@ -141,10 +141,6 @@ function forum_upgrade($oldversion) { );'); } - if ($oldversion < 2005042301) { // Add user tracking prefs field. - modify_database('','ALTER TABLE prefix_user ADD - trackforums integer default 0 NOT NULL;'); - } return true; diff --git a/version.php b/version.php index a799330045e..d0875791a49 100644 --- a/version.php +++ b/version.php @@ -6,7 +6,7 @@ // This is compared against the values stored in the database to determine // whether upgrades should be performed (see lib/db/*.php) - $version = 2005042300; // YYYYMMDD = date + $version = 2005042400; // YYYYMMDD = date // XY = increments within a single day $release = '1.5 ALPHA'; // Human-friendly version name