Bug 477264 - Server error 'Foreign key constraint fails...' when adding any attribute into an environment

git-svn-id: svn://10.0.0.236/trunk@258191 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
ghendricks%novell.com 2009-08-21 16:41:45 +00:00
parent 46a36754cf
commit 89522bd512
2 changed files with 2 additions and 6 deletions

View File

@ -972,11 +972,6 @@ $schema->{test_attachments} = {
property_id => {
TYPE => 'INT4',
NOTNULL => 1,
REFERENCES => {
TABLE => 'test_environment_property',
COLUMN => 'property_id',
DELETE => 'CASCADE'
}
},
element_id => {
TYPE => 'INT4',

View File

@ -63,7 +63,8 @@ sub testopiaUpdateDB {
$dbh->bz_drop_column('test_plans', 'editor_id');
$dbh->bz_drop_fk('test_cases', 'priority_id') if $dbh->bz_column_info('test_cases','priority_id')->{REFERENCES}->{DELETE} eq 'CASCADE';
$dbh->bz_drop_fk('test_environment_map', 'property_id');
$dbh->bz_add_column('test_case_bugs', 'case_id', {TYPE => 'INT4'});
$dbh->bz_add_column('test_case_runs', 'environment_id', {TYPE => 'INT4', NOTNULL => 1}, 0);
$dbh->bz_add_column('test_case_tags', 'userid', {TYPE => 'INT3', NOTNULL => 1}, 0);