@@ -, +, @@ courses table is shorter than 20 characters and one whose code is longer than 20 characters. the other the long department. displays the department name only for the short course. department to it again. now display their assigned department. --- installer/data/mysql/kohastructure.sql | 4 ++-- installer/data/mysql/updatedatabase.pl | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) --- a/installer/data/mysql/kohastructure.sql +++ a/installer/data/mysql/kohastructure.sql @@ -478,11 +478,11 @@ CREATE TABLE collections_tracking ( DROP TABLE IF EXISTS courses; CREATE TABLE `courses` ( `course_id` int(11) NOT NULL AUTO_INCREMENT, - `department` varchar(20) DEFAULT NULL, -- Stores the authorised value DEPT + `department` varchar(80) DEFAULT NULL, -- Stores the authorised value DEPT `course_number` varchar(255) DEFAULT NULL, -- An arbitrary field meant to store the "course number" assigned to a course `section` varchar(255) DEFAULT NULL, -- Also arbitrary, but for the 'section' of a course. `course_name` varchar(255) DEFAULT NULL, - `term` varchar(20) DEFAULT NULL, -- Stores the authorised value TERM + `term` varchar(80) DEFAULT NULL, -- Stores the authorised value TERM `staff_note` mediumtext, `public_note` mediumtext, `students_count` varchar(20) DEFAULT NULL, -- Meant to be just an estimate of how many students will be taking this course/section --- a/installer/data/mysql/updatedatabase.pl +++ a/installer/data/mysql/updatedatabase.pl @@ -7050,6 +7050,14 @@ if ( CheckVersion($DBversion) ) { SetVersion($DBversion); } +$DBversion = "3.13.00.XXX"; +if ( CheckVersion($DBversion) ) { + $dbh->do("ALTER TABLE courses MODIFY COLUMN department varchar(80) DEFAULT NULL;"); + $dbh->do("ALTER TABLE courses MODIFY COLUMN term varchar(80) DEFAULT NULL;"); + print "Upgrade to $DBversion done (Bug 10604: correct width of courses.department and courses.term)\n"; + SetVersion($DBversion); +} + =head1 FUNCTIONS =head2 TableExists($table) --