From a22fd258aa02cc35fc8eb01824964a3bb75b8d49 Mon Sep 17 00:00:00 2001 From: mjollnir_ Date: Thu, 27 Jan 2005 20:41:54 +0000 Subject: [PATCH] Fixing a typo in metacourses in mysql (id should be int 10 not int 1). Hopefully this is the end of it :( --- lib/db/mysql.php | 7 ++++++- lib/db/mysql.sql | 2 +- version.php | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/db/mysql.php b/lib/db/mysql.php index a37cefb764..1ffc24ba65 100644 --- a/lib/db/mysql.php +++ b/lib/db/mysql.php @@ -1126,7 +1126,7 @@ function main_upgrade($oldversion=0) { // add new table for meta courses. modify_database("","CREATE TABLE `prefix_course_meta` ( - `id` int(1) unsigned NOT NULL auto_increment, + `id` int(10) unsigned NOT NULL auto_increment, `parent_course` int(10) NOT NULL default 0, `child_course` int(10) NOT NULL default 0, PRIMARY KEY (`id`), @@ -1137,6 +1137,11 @@ function main_upgrade($oldversion=0) { table_column('course','','metacourse','integer','1','','0','not null'); } + if ($oldversion < 2005012800) { + // fix a typo (int 1 becomes int 10) + table_column('course_meta','id','id','integer','10','','0','not null'); + } + return $result; } diff --git a/lib/db/mysql.sql b/lib/db/mysql.sql index dc1db4c98f..dd6b2baee5 100644 --- a/lib/db/mysql.sql +++ b/lib/db/mysql.sql @@ -552,7 +552,7 @@ CREATE TABLE `prefix_user_coursecreators` ( CREATE TABLE `prefix_course_meta` ( - `id` int(1) unsigned NOT NULL auto_increment, + `id` int(10) unsigned NOT NULL auto_increment, `parent_course` int(10) NOT NULL default 0, `child_course` int(10) NOT NULL default 0, PRIMARY KEY (`id`), diff --git a/version.php b/version.php index 44bb0129b6..fe2b37e7ac 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 = 2005012501; // YYYYMMDD = date of first major branch release 1.4 + $version = 2005012800; // YYYYMMDD = date of first major branch release 1.4 // XY = increments within a single day $release = '1.5 UNSTABLE DEVELOPMENT'; // Human-friendly version name -- 2.39.5