summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2007-12-23 07:25:01 +0100
committermkanat%bugzilla.org <>2007-12-23 07:25:01 +0100
commit4ee554d7d2a5a6a6f1e89f253afd9112f360d11e (patch)
treec4abcf196346e84c7a0f52b5cf4a1a8f3fd4e334
parentedf97ecb4b942f6ed515d16d381c212668e96513 (diff)
downloadbugzilla-4ee554d7d2a5a6a6f1e89f253afd9112f360d11e.tar.gz
bugzilla-4ee554d7d2a5a6a6f1e89f253afd9112f360d11e.tar.xz
Bug 409463: The flagtypes.description DB format is not the same in an upgraded installation and in a fresh one
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> (module owner) a=mkanat
-rw-r--r--Bugzilla/DB/Schema.pm2
-rw-r--r--Bugzilla/Install/DB.pm3
2 files changed, 3 insertions, 2 deletions
diff --git a/Bugzilla/DB/Schema.pm b/Bugzilla/DB/Schema.pm
index 2be64cab3..3d7f56674 100644
--- a/Bugzilla/DB/Schema.pm
+++ b/Bugzilla/DB/Schema.pm
@@ -470,7 +470,7 @@ use constant ABSTRACT_SCHEMA => {
id => {TYPE => 'SMALLSERIAL', NOTNULL => 1,
PRIMARYKEY => 1},
name => {TYPE => 'varchar(50)', NOTNULL => 1},
- description => {TYPE => 'MEDIUMTEXT'},
+ description => {TYPE => 'MEDIUMTEXT', NOTNULL => 1},
cc_list => {TYPE => 'varchar(200)'},
target_type => {TYPE => 'char(1)', NOTNULL => 1,
DEFAULT => "'b'"},
diff --git a/Bugzilla/Install/DB.pm b/Bugzilla/Install/DB.pm
index 3b44f3016..43c81d1dd 100644
--- a/Bugzilla/Install/DB.pm
+++ b/Bugzilla/Install/DB.pm
@@ -2948,8 +2948,9 @@ sub change_text_types {
{ TYPE => 'TINYTEXT', NOTNULL => 1 });
$dbh->bz_alter_column('attachments', 'mimetype',
{ TYPE => 'TINYTEXT', NOTNULL => 1 });
+ # This also changes NULL to NOT NULL.
$dbh->bz_alter_column('flagtypes', 'description',
- { TYPE => 'MEDIUMTEXT', NOTNULL => 1 });
+ { TYPE => 'MEDIUMTEXT', NOTNULL => 1 }, '');
$dbh->bz_alter_column('fielddefs', 'description',
{ TYPE => 'TINYTEXT', NOTNULL => 1 });
$dbh->bz_alter_column('namedqueries', 'query',