summaryrefslogtreecommitdiffstats
path: root/Bugzilla/DB/Schema/Oracle.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla/DB/Schema/Oracle.pm')
-rw-r--r--Bugzilla/DB/Schema/Oracle.pm10
1 files changed, 8 insertions, 2 deletions
diff --git a/Bugzilla/DB/Schema/Oracle.pm b/Bugzilla/DB/Schema/Oracle.pm
index c3868ad44..8d237d27e 100644
--- a/Bugzilla/DB/Schema/Oracle.pm
+++ b/Bugzilla/DB/Schema/Oracle.pm
@@ -215,6 +215,11 @@ sub get_add_column_ddl {
return @sql;
}
+sub get_drop_default_ddl {
+ my ($self, $table, $column) = @_;
+ return "ALTER TABLE $table MODIFY $column DEFAULT NULL";
+}
+
sub get_alter_column_ddl {
my ($self, $table, $column, $new_def, $set_nulls_to) = @_;
@@ -240,8 +245,7 @@ sub get_alter_column_ddl {
}
# If we went from having a default to not having one
elsif (!defined $default && defined $default_old) {
- push(@statements, "ALTER TABLE $table MODIFY $column"
- . " DEFAULT NULL");
+ push(@statements, $self->get_drop_default_ddl($table, $column));
}
# If we went from no default to a default, or we changed the default.
elsif ( (defined $default && !defined $default_old) ||
@@ -524,6 +528,8 @@ sub get_set_serial_sql {
=item get_drop_column_ddl
+=item get_drop_default_ddl
+
=item get_drop_table_ddl
=item get_drop_fk_sql