diff options
author | mkanat%bugzilla.org <> | 2008-06-26 16:23:27 +0200 |
---|---|---|
committer | mkanat%bugzilla.org <> | 2008-06-26 16:23:27 +0200 |
commit | 3defd9c08f4d352c53723828665f999d25613076 (patch) | |
tree | b15ac731c70ea809393b93e227f371c1ecaddf85 /Bugzilla/DB | |
parent | 4a0e946fb30212c232c6651a47e057d6cc602a1d (diff) | |
download | bugzilla-3defd9c08f4d352c53723828665f999d25613076.tar.gz bugzilla-3defd9c08f4d352c53723828665f999d25613076.tar.xz |
Bug 423598: Add foreign key constraints for keywords table
Patch By Tony Fu <tfu@redhat.com> r=mkanat, a=mkanat
Diffstat (limited to 'Bugzilla/DB')
-rw-r--r-- | Bugzilla/DB/Schema.pm | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Bugzilla/DB/Schema.pm b/Bugzilla/DB/Schema.pm index e35162b02..27f6384e4 100644 --- a/Bugzilla/DB/Schema.pm +++ b/Bugzilla/DB/Schema.pm @@ -482,8 +482,15 @@ use constant ABSTRACT_SCHEMA => { keywords => { FIELDS => [ - bug_id => {TYPE => 'INT3', NOTNULL => 1}, - keywordid => {TYPE => 'INT2', NOTNULL => 1}, + bug_id => {TYPE => 'INT3', NOTNULL => 1, + REFERENCES => {TABLE => 'bugs', + COLUMN => 'bug_id', + DELETE => 'CASCADE'}}, + keywordid => {TYPE => 'INT2', NOTNULL => 1, + REFERENCES => {TABLE => 'keyworddefs', + COLUMN => 'id', + DELETE => 'CASCADE'}}, + ], INDEXES => [ keywords_bug_id_idx => {FIELDS => [qw(bug_id keywordid)], |