Commit 55e5f706 authored by lpsolit%gmail.com's avatar lpsolit%gmail.com

Bug 460922: [Oracle] Need to drop all the FKs before dropping tables - Patch by…

Bug 460922: [Oracle] Need to drop all the FKs before dropping tables - Patch by Xiaoou <xiaoou.wu@oracle.com> r/a=mkanat
parent 96c07aa8
......@@ -208,6 +208,24 @@ sub sql_in {
return "( " . join(" OR ", @in_str) . " )";
}
sub bz_drop_table {
my ($self, $name) = @_;
my $table_exists = $self->bz_table_info($name);
if ($table_exists) {
$self->_bz_drop_fks($name);
$self->SUPER::bz_drop_table($name);
}
}
# Dropping all FKs for a specified table.
sub _bz_drop_fks {
my ($self, $table) = @_;
my @columns = $self->_bz_real_schema->get_table_columns($table);
foreach my $column (@columns) {
$self->bz_drop_fk($table, $column);
}
}
sub _fix_empty {
my ($string) = @_;
$string = '' if $string eq EMPTY_STRING;
......
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