summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2011-12-19 19:54:21 +0100
committerFrédéric Buclin <LpSolit@gmail.com>2011-12-19 19:54:21 +0100
commit17a51b0772e8c6ccd43e46cb78a84122c6364d5f (patch)
tree668aff2ca4afa0e910314b91dcbeafd0135bce67
parentd45aa2ec90f32c8e3de1b0397196a5e53ec6ddeb (diff)
downloadbugzilla-17a51b0772e8c6ccd43e46cb78a84122c6364d5f.tar.gz
bugzilla-17a51b0772e8c6ccd43e46cb78a84122c6364d5f.tar.xz
Bug 711925: Update from 4.0 or older to 4.2 or trunk fails when bug_see_also field is populated
r=wicked a=LpSolit
-rw-r--r--Bugzilla/DB/Schema.pm2
-rw-r--r--Bugzilla/Install/DB.pm2
2 files changed, 2 insertions, 2 deletions
diff --git a/Bugzilla/DB/Schema.pm b/Bugzilla/DB/Schema.pm
index adbbf7b38..7b7e4ffb6 100644
--- a/Bugzilla/DB/Schema.pm
+++ b/Bugzilla/DB/Schema.pm
@@ -502,7 +502,7 @@ use constant ABSTRACT_SCHEMA => {
COLUMN => 'bug_id',
DELETE => 'CASCADE'}},
value => {TYPE => 'varchar(255)', NOTNULL => 1},
- class => {TYPE => 'varchar(255)', NOTNULL => 1},
+ class => {TYPE => 'varchar(255)', NOTNULL => 1, DEFAULT => "''"},
],
INDEXES => [
bug_see_also_bug_id_idx => {FIELDS => [qw(bug_id value)],
diff --git a/Bugzilla/Install/DB.pm b/Bugzilla/Install/DB.pm
index dff3c6d2e..b98b88077 100644
--- a/Bugzilla/Install/DB.pm
+++ b/Bugzilla/Install/DB.pm
@@ -3568,7 +3568,7 @@ sub _populate_bug_see_also_class {
}
$dbh->bz_add_column('bug_see_also', 'class',
- {TYPE => 'varchar(255)', NOTNULL => 1}, '');
+ {TYPE => 'varchar(255)', NOTNULL => 1, DEFAULT => "''"}, '');
my $result = $dbh->selectall_arrayref(
"SELECT id, value FROM bug_see_also");