summaryrefslogtreecommitdiffstats
path: root/Bugzilla/DB/Schema
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2009-04-04 06:11:25 +0200
committermkanat%bugzilla.org <>2009-04-04 06:11:25 +0200
commit2c536d9c715f931d06e28850dba33241f43a078c (patch)
treea883644b68b6e262e3103eecd53ae26d3557757c /Bugzilla/DB/Schema
parentf9a7938b592a1d95fc718c2b86cf90506615b675 (diff)
downloadbugzilla-2c536d9c715f931d06e28850dba33241f43a078c.tar.gz
bugzilla-2c536d9c715f931d06e28850dba33241f43a078c.tar.xz
Bug 486239: [Oracle] Missing keyword RESTRICT on fk creation (DB::Schema explicitly specified DELETE => 'RESTRICT')
Patch by Xiaoou Wu <xiaoou.wu@oracle.com> and Max Kanat-Alexander <mkanat@bugzilla.org> r=mkanat
Diffstat (limited to 'Bugzilla/DB/Schema')
-rw-r--r--Bugzilla/DB/Schema/Oracle.pm3
1 files changed, 3 insertions, 0 deletions
diff --git a/Bugzilla/DB/Schema/Oracle.pm b/Bugzilla/DB/Schema/Oracle.pm
index 8332be707..d8b24e49b 100644
--- a/Bugzilla/DB/Schema/Oracle.pm
+++ b/Bugzilla/DB/Schema/Oracle.pm
@@ -145,6 +145,9 @@ sub get_fk_ddl {
my $to_column = $references->{COLUMN} || confess "No column in reference";
my $fk_name = $self->_get_fk_name($table, $column, $references);
+ # 'ON DELETE RESTRICT' is enabled by default
+ $delete = "" if ($delete =~ /RESTRICT/i);
+
my $fk_string = "\n CONSTRAINT $fk_name FOREIGN KEY ($column)\n"
. " REFERENCES $to_table($to_column)\n";