Commit 948046e0 authored by mkanat%kerio.com's avatar mkanat%kerio.com

Bug 285824: whiteboard, votes, and keywords update in checksetup.pl fails to…

Bug 285824: whiteboard, votes, and keywords update in checksetup.pl fails to detect an already-upgraded schema Patch By Max Kanat-Alexander <mkanat@kerio.com> r=justdave, a=justdave
parent a9a03e40
......@@ -3837,22 +3837,29 @@ if (!defined $dbh->bz_get_index_def('bugs_activity','who')) {
$dbh->do('ALTER TABLE bugs_activity ADD INDEX (who)');
}
$dbh->bz_change_field_type('bugs', 'status_whiteboard',
q{mediumtext not null default ''});
$dbh->bz_change_field_type('bugs', 'keywords',
q{mediumtext not null default ''});
$dbh->bz_change_field_type('bugs', 'votes', 'mediumint not null default 0');
# This lastdiffed change and these default changes are unrelated,
# but in order for MySQL to successfully run these default changes only once,
# they have to be inside this block.
# If bugs.lastdiffed is NOT NULL...
if(!$dbh->bz_get_field_def('bugs', 'lastdiffed')->[2]) {
# Add defaults for some fields that should have them but didn't.
$dbh->bz_change_field_type('bugs', 'status_whiteboard',
q{mediumtext not null default ''});
$dbh->bz_change_field_type('bugs', 'keywords',
q{mediumtext not null default ''});
$dbh->bz_change_field_type('bugs', 'votes',
'mediumint not null default 0');
# And change lastdiffed to NULL
$dbh->bz_change_field_type('bugs', 'lastdiffed', 'datetime');
}
# 2005-03-03 travis@sedsystems.ca -- Bug 41972
add_setting ("display_quips", {"on" => 1, "off" => 2 }, "on" );
$dbh->bz_change_field_type('bugs', 'lastdiffed', 'datetime');
} # END LEGACY CHECKS
# If you had to change the --TABLE-- definition in any way, then add your
# differential change code *** A B O V E *** this comment.
#
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment