Bug 923865: Testopia is not compatible with Bugzilla 4.5 due to a DB schema change

git-svn-id: svn://10.0.0.236/trunk@265118 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bzrmirror%bugzilla.org 2013-11-20 13:00:17 +00:00
parent 41618b7096
commit ed18f08aac
3 changed files with 17 additions and 3 deletions

View File

@ -1 +1 @@
664
665

View File

@ -151,6 +151,13 @@ sub derive_regexp_groups {
# End of redefined subroutines.
sub bz_version {
BUGZILLA_VERSION =~ /^(\d+\.\d+)(?:(rc|\.)(\d+))?\+?$/;
# There are no DB schema changes on stable branches so
# we don't care about minor releases.
return $1;
}
sub bug_end_of_update {
my ($self, $args) = @_;
@ -936,7 +943,7 @@ sub db_schema_abstract_schema {
}
},
component_id => {
TYPE => 'INT2',
TYPE => bz_version() > 4.4 ? 'INT3' : 'INT2',
NOTNULL => 1,
REFERENCES => {
TABLE => 'components',
@ -1476,6 +1483,13 @@ sub install_update_db {
COLUMN => 'case_id',
DELETE => 'CASCADE'
}});
if (bz_version() > 4.4) {
$dbh->bz_alter_column('test_case_components', 'component_id', {TYPE => 'INT3', NOTNULL => 1, REFERENCES => {
TABLE => 'components',
COLUMN => 'id',
DELETE => 'CASCADE'
}});
}
$dbh->bz_alter_column('test_case_dependencies', 'blocked', {TYPE => 'INT4', NOTNULL => 1});
$dbh->bz_alter_column('test_case_dependencies', 'dependson', {TYPE => 'INT4', NOTNULL => 1});
$dbh->bz_alter_column('test_case_plans', 'case_id', {TYPE => 'INT4', NOTNULL => 1, REFERENCES => {

View File

@ -1,7 +1,7 @@
<?php
// by Edd Dumbill (C) 1999-2002
// <edd@usefulinc.com>
// $Id: .xmlrpc.inc.php,v 1.27 2012-11-10 12:30:19 mkanat%bugzilla.org Exp $
// $Id: .xmlrpc.inc.php,v 1.28 2013-11-20 13:00:17 bzrmirror%bugzilla.org Exp $
// Copyright (c) 1999,2000,2002 Edd Dumbill.
// All rights reserved.