Bugzilla – Attachment 19828 Details for
Bug 10604
two columns in the courses table aren't wide enough
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 10604: increase width of two columns in the courses table
PASSED-QA-Bug-10604-increase-width-of-two-columns-.patch (text/plain), 3.32 KB, created by
Katrin Fischer
on 2013-07-21 09:02:09 UTC
(
hide
)
Description:
[PASSED QA] Bug 10604: increase width of two columns in the courses table
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2013-07-21 09:02:09 UTC
Size:
3.32 KB
patch
obsolete
>From a5c31bfbdbf4b2ebeac483fb62723596d5e47d5b Mon Sep 17 00:00:00 2001 >From: Galen Charlton <gmc@esilibrary.com> >Date: Wed, 17 Jul 2013 14:35:16 +0000 >Subject: [PATCH] [PASSED QA] Bug 10604: increase width of two columns in the > courses table > >The department and term columns in the courses table started >as varchar(20), but since they refer to authorized values, need >to be varchar(80) to match authorised_values.authorised_value. This >patch increases the width of those columns. > >To test: > >[1] Create two DEPARTMENT authorised values, one whose code > is shorter than 20 characters and one whose code is longer > than 20 characters. >[2] Create two courses; give one course the short department and > the other the long department. >[3] Go to the courses list. Observe that the department column is > displays the department name only for the short course. >[4] Apply the patch. >[5] Edit the course with the long department and assign that long > department to it again. >[6] Go back to the courses list. Observe that both of the courses > now display their assigned department. > >Signed-off-by: Galen Charlton <gmc@esilibrary.com> >Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >Verified changes are consistent for new installations >and updated installations. >Passes all tests. >--- > installer/data/mysql/kohastructure.sql | 4 ++-- > installer/data/mysql/updatedatabase.pl | 8 ++++++++ > 2 files changed, 10 insertions(+), 2 deletions(-) > >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 8f9b30c..8a8b70f 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/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 >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index fd8421e..e0c665a 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/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) >-- >1.7.9.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 10604
:
19729
|
19817
| 19828