From 564065d5fc358f87c3c2e4d71eab5acb25a53749 Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Thu, 8 May 2008 02:08:48 +0000 Subject: Bug 414292: [Oracle] Change series.query back to MEDIUMTEXT Patch By Xiaoou Wu r=mkanat, a=mkanat --- Bugzilla/DB/Schema.pm | 2 +- Bugzilla/Install/DB.pm | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Bugzilla/DB/Schema.pm b/Bugzilla/DB/Schema.pm index b8ac649b7..39f3caf20 100644 --- a/Bugzilla/DB/Schema.pm +++ b/Bugzilla/DB/Schema.pm @@ -1089,7 +1089,7 @@ use constant ABSTRACT_SCHEMA => { name => {TYPE => 'varchar(64)', NOTNULL => 1}, frequency => {TYPE => 'INT2', NOTNULL => 1}, last_viewed => {TYPE => 'DATETIME'}, - query => {TYPE => 'LONGTEXT', NOTNULL => 1}, + query => {TYPE => 'MEDIUMTEXT', NOTNULL => 1}, is_public => {TYPE => 'BOOLEAN', NOTNULL => 1, DEFAULT => 'FALSE'}, ], diff --git a/Bugzilla/Install/DB.pm b/Bugzilla/Install/DB.pm index ca011ce6c..d1f1aadb5 100644 --- a/Bugzilla/Install/DB.pm +++ b/Bugzilla/Install/DB.pm @@ -522,6 +522,10 @@ sub update_table_definitions { $dbh->bz_drop_index('longdescs', 'longdescs_thetext_idx'); _populate_bugs_fulltext(); + # 2008-01-18 xiaoou.wu@oracle.com - Bug 414292 + $dbh->bz_alter_column('series', 'query', + { TYPE => 'MEDIUMTEXT', NOTNULL => 1 }); + ################################################################ # New --TABLE-- changes should go *** A B O V E *** this point # ################################################################ @@ -2935,7 +2939,8 @@ sub _fix_attachment_modification_date { sub _change_text_types { my $dbh = Bugzilla->dbh; - return if $dbh->bz_column_info('series', 'query')->{TYPE} eq 'LONGTEXT'; + return if + $dbh->bz_column_info('namedqueries', 'query')->{TYPE} eq 'LONGTEXT'; _check_content_length('attachments', 'mimetype', 255, 'attach_id'); _check_content_length('fielddefs', 'description', 255, 'id'); _check_content_length('attachments', 'description', 255, 'attach_id'); @@ -2953,14 +2958,13 @@ sub _change_text_types { { TYPE => 'MEDIUMTEXT', NOTNULL => 1 }, ''); $dbh->bz_alter_column('fielddefs', 'description', { TYPE => 'TINYTEXT', NOTNULL => 1 }); - $dbh->bz_alter_column('namedqueries', 'query', - { TYPE => 'LONGTEXT', NOTNULL => 1 }); $dbh->bz_alter_column('groups', 'description', { TYPE => 'MEDIUMTEXT', NOTNULL => 1 }); $dbh->bz_alter_column('quips', 'quip', { TYPE => 'MEDIUMTEXT', NOTNULL => 1 }); - $dbh->bz_alter_column('series', 'query', + $dbh->bz_alter_column('namedqueries', 'query', { TYPE => 'LONGTEXT', NOTNULL => 1 }); + } sub _check_content_length { -- cgit v1.2.3-24-g4f1b